//parse the omEnvelope element and stuff it with the attachment
//specific omText nodes
insertAttachmentNodes(envelope, request);
Call call = new Call();
URL url = new URL(endpoint.toString());
Options options = new Options();
options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
options.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP,
false);
options.setTo(
new EndpointReference(url.toString()));
call.setClientOptions(options);
String axisOp = request.getSOAPBody().getFirstChild().getNodeName();
NodeImpl bodyContentNode = (NodeImpl)request.getSOAPBody().getFirstChild();
OMElement bodyContent = (OMElement)bodyContentNode.getOMNode();
OMElement result = call.invokeBlocking(axisOp, bodyContent);
org.apache.axis2.soap.SOAPEnvelope responseEnv = (org.apache.axis2.soap.SOAPEnvelope) ((OMElement)result.getParent()).getParent();
SOAPEnvelopeImpl response = new SOAPEnvelopeImpl(responseEnv);
SOAPMessageImpl sMsg = new SOAPMessageImpl(response);
extractAttachmentNodes(responseEnv, sMsg);