leadContext)).useAsyncMessaging(correlator)
.setAsyncResponseTimeoutInMs(33000L); // to simplify testing
// set to just few
// seconds
WSIFPort port = wclient.getPort();
WSIFOperation operation = port.createOperation("deploy");
WSIFMessage outputMessage = operation.createOutputMessage();
WSIFMessage faultMessage = operation.createFaultMessage();
XmlElement inputMessageElement = xmlObjectToEl(getDeploymentPayload(
workflow, this.xbayaEngine.getConfiguration().getDSCURL()));
WSIFMessage inputMessage = new WSIFMessageElement(
inputMessageElement);
System.out.println("Sending a message:\n"
+ XMLUtil.xmlElementToString((XmlElement) inputMessage));
boolean success = operation.executeRequestResponseOperation(
inputMessage, outputMessage, faultMessage);
XmlElement result;
if (success) {
result = (XmlElement) outputMessage;
} else {
throw new XsulException(faultMessage.toString());
}
} catch (IOException e) {
throw new WorkflowProxyException(e);
} catch (XmlBuilderException e) {
throw new WorkflowProxyException(e);
} catch (GraphException e) {
throw new WorkflowProxyException(e);
} catch (ComponentException e) {
throw new WorkflowProxyException(e);
}
XBayaConfiguration configuration = this.xbayaEngine.getConfiguration();
WsdlDefinitions workflowWSDL;
try {
workflowWSDL = workflow.getOdeWorkflowWSDL(configuration
.getDSCURL(), configuration.getODEURL());
} catch (Exception e) {
// shouldnt happen cos we have already called this once
throw new XBayaRuntimeException(e);
}
org.xmlpull.infoset.XmlElement service = workflowWSDL.xml().element(
null, "service");
org.xmlpull.infoset.XmlElement port = service.element(null, "port");
org.xmlpull.infoset.XmlElement address = port.element(null, "address");
String location = address.attributeValue("location");
URI ret = null;
try {
ret = new URI(location + "?wsdl");