To configure a client with different bindings for Request and Response classes:
SoapClient soapClient = new SoapClient(path); soapClient.setOutBodyBindingFactory(BindingDirectory.getFactory(Request.class)); soapClient.setInBodyBindingFactory(BindingDirectory.getFactory(Response.class)); response = soapClient.call(request);
If a SOAP Fault occurs, the call
method will throw a {@link SoapFaultException}. Any detail elements of the SOAP fault are skipped unless handlers are configured to read the SOAP fault detail elements, see {@link #addInFaultDetailsHandler(InHandler)} or {@link #addInFaultDetailsBindingFactory(IBindingFactory)}.
By default an encoding of UTF-8 is used, the outbound XML is unformatted and contains an XML declaration of <?xml version="1.0" encoding="UTF-8"?>
. The encoding, XML declaration and formatting of the outbound message can be overridden by calling {@link #setMessageOptions(MessageOptions)}.
@author Nigel Charman
|
|
|
|
|
|