.create("http://host/2005/11/09/workflowinstace"));
leadContext.setNodeId("decoder1");
leadContext.setTimeStep("5");
leadContext.setServiceInstanceId(URI.create("decoder-instance-10"));
XmlElement element3 = XMLUtil.xmlElement5ToXmlElement3(definitions
.xml());
xsul.wsdl.WsdlDefinitions definitions3 = new xsul.wsdl.WsdlDefinitions(
element3);
WSIFClient wclient = WSIFRuntime.getDefault().newClientFor(
definitions3, "TestCMD_Example1SoapPort");
StickySoapHeaderHandler handler = new StickySoapHeaderHandler(
"use-lead-header", leadContext);
wclient.addHandler(handler);
wclient.useAsyncMessaging(correlator);
wclient.setAsyncResponseTimeoutInMs(33000L);
WSIFPort port = wclient.getPort();
WSIFOperation operation = port.createOperation("Run");
WSIFMessage inputMessage = operation.createInputMessage();
WSIFMessage outputMessage = operation.createOutputMessage();
WSIFMessage faultMessage = operation.createFaultMessage();
// inputMessage.setObjectPart("InputParam1", "Hello");
inputMessage.setObjectPart("InputParam1", "100");
logger.info("inputMessage: "
+ XsulUtil.safeXmlToString((XmlElement) inputMessage));
boolean success = operation.executeRequestResponseOperation(
inputMessage, outputMessage, faultMessage);
XmlElement result;
if (success) {
result = (XmlElement) outputMessage;
} else {
result = (XmlElement) faultMessage;
}