OMElement omFormUrl = omFactory.createOMElement("formUrl", omNamespace, omInitProcessRequest);
omFormUrl.setText(formUrl);
OMElement omTaskOutput = omFactory.createOMElement("taskOutput", omNamespace, omInitProcessRequest);
XmlTooling xmlTooling = new XmlTooling();
if (input != null)
omTaskOutput.addChild(xmlTooling.convertDOMToOM(input, omFactory));
Options options = new Options();
EndpointReference endpointReference = new EndpointReference(task.getProcessEndpoint().toString());
options.setTo(endpointReference);
options.setAction(task.getInitOperationSOAPAction());
if (_logger.isDebugEnabled()) {
_logger.debug(task + " was used to start the process with endpoint:" + task.getProcessEndpoint());
_logger.debug("Request to Ode:\n" + omInitProcessRequest.toString());
}
ServiceClient client = getServiceClient();
client.setOptions(options);
try {
options.setTimeOutInMilliSeconds(_httpTimeout);
OMElement response = client.sendReceive(omInitProcessRequest);
return xmlTooling.convertOMToDOM(response);
} catch (Exception e) {
_logger.error("Error while sending initProcessRequest:" + e.getClass(), e);
throw AxisFault.makeFault(e);
}