* @throws javax.xml.soap.SOAPException if there is a SOAP error, or this SOAPConnection is
* already closed
*/
public SOAPMessage call(SOAPMessage request, Object endpoint) throws SOAPException {
if (closed) {
throw new SOAPException("SOAPConnection closed");
}
// initialize URL
URL url;
try {
url = (endpoint instanceof URL) ? (URL)endpoint : new URL(endpoint.toString());
} catch (MalformedURLException e) {
throw new SOAPException(e.getMessage());
}
// initialize and set Options
Options options = new Options();
options.setTo(new EndpointReference(url.toString()));
// initialize the Sender
OperationClient opClient;
try {
serviceClient = new ServiceClient();
disableMustUnderstandProcessing(serviceClient.getAxisConfiguration());
opClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
} catch (AxisFault e) {
throw new SOAPException(e);
}
options.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
request.getProperty(SOAPMessage.CHARACTER_SET_ENCODING));