return msg;
}
protected Object invokeTarget(Message msg) throws AxisFault {
OperationClient operationClient = createOperationClient(msg);
// ensure connections are tracked so that they can be closed by the reference binding
MessageContext requestMC = operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
requestMC.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
requestMC.getOptions().setTimeOutInMilliSeconds(120000L);
operationClient.execute(true);
MessageContext responseMC = operationClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
OMElement response = responseMC.getEnvelope().getBody().getFirstElement();
// FIXME: [rfeng] We have to pay performance penality to build the complete OM as the operationClient.complete() will
// release the underlying HTTP connection.
// Force the response to be populated, see https://issues.apache.org/jira/browse/TUSCANY-1541
if (response != null) {
response.build();
}
operationClient.complete(requestMC);
return response;
}