private static MessageContext sendReceive(OMElement llomElement, ServiceClient serviceClient) throws AxisFault { MessageContext messageContext = new MessageContext(); fillSOAPEnvelope(messageContext, llomElement, serviceClient); OperationClient operationClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP); operationClient.addMessageContext(messageContext); operationClient.execute(true); MessageContext response = operationClient .getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); if (serviceClient.getOptions().isCallTransportCleanup()) { response.getEnvelope().build(); serviceClient.cleanupTransport(); return response; } else { return response; } }
/** * Directly invoke a named operationQName with an In-Out MEP. This method sends your supplied * XML and receives a response. For more control, you can instead create a client for the * operationQName and use that client to execute the exchange. * <p> * Unless the <code>callTransportCleanup</code> property on the {@link Options} object has been * set to <code>true</code>, the caller must invoke {@link #cleanupTransport()} after * processing the response. * * @param operationQName name of operationQName to be invoked (non-<code>null</code>) * @param xmlPayload the data to send (becomes the content of SOAP body) * @return response OMElement * @throws AxisFault in case of error * @see #cleanupTransport() */ public OMElement sendReceive(QName operationQName, OMElement xmlPayload) throws AxisFault { MessageContext messageContext = new MessageContext(); fillSOAPEnvelope(messageContext, xmlPayload); OperationClient operationClient = createClient(operationQName); operationClient.addMessageContext(messageContext); operationClient.execute(true); MessageContext response = operationClient .getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); if (options.isCallTransportCleanup()) { response.getEnvelope().build(); cleanupTransport(); } return response.getEnvelope().getBody().getFirstElement(); }
/** * Directly invoke a named operationQName with an In-Out MEP. This method sends your supplied * XML and receives a response. For more control, you can instead create a client for the * operationQName and use that client to execute the exchange. * <p> * Unless the <code>callTransportCleanup</code> property on the {@link Options} object has been * set to <code>true</code>, the caller must invoke {@link #cleanupTransport()} after * processing the response. * * @param operationQName name of operationQName to be invoked (non-<code>null</code>) * @param xmlPayload the data to send (becomes the content of SOAP body) * @return response OMElement * @throws AxisFault in case of error * @see #cleanupTransport() */ public OMElement sendReceive(QName operationQName, OMElement xmlPayload) throws AxisFault { MessageContext messageContext = new MessageContext(); fillSOAPEnvelope(messageContext, xmlPayload); OperationClient operationClient = createClient(operationQName); operationClient.addMessageContext(messageContext); operationClient.execute(true); MessageContext response = operationClient .getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); if (options.isCallTransportCleanup()) { response.getEnvelope().build(); cleanupTransport(); } return response.getEnvelope().getBody().getFirstElement(); }
@Override public OMElement sendReceive(QName operationQName, OMElement xmlPayload) throws AxisFault { MessageContext messageContext = new MessageContext(); fillSOAPEnvelope(messageContext, xmlPayload); OperationClient operationClient = createClient(operationQName); operationClient.addMessageContext(messageContext); operationClient.execute(true); MessageContext response = operationClient .getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE); if (super.getOptions().isCallTransportCleanup()) { response.getEnvelope().build(); cleanupTransport(); } return response.getEnvelope().getBody(); }
clonedOptions.setCallTransportCleanup(options.isCallTransportCleanup()); clonedOptions.setExceptionToBeThrownOnSOAPFault(options.isExceptionToBeThrownOnSOAPFault()); clonedOptions.setManageSession(options.isManageSession());
clonedOptions.setCallTransportCleanup(options.isCallTransportCleanup()); clonedOptions.setExceptionToBeThrownOnSOAPFault(options.isExceptionToBeThrownOnSOAPFault()); clonedOptions.setManageSession(options.isManageSession());
clonedOptions.setCallTransportCleanup(options.isCallTransportCleanup()); clonedOptions.setExceptionToBeThrownOnSOAPFault(options.isExceptionToBeThrownOnSOAPFault()); clonedOptions.setManageSession(options.isManageSession());