T
- the SOAP client typepublic abstract class SoapClientHandler<T> extends Object implements SoapClientHandlerInterface<T>
invoke(SoapCall)
will
perform the method retrieved from SoapCall.getSoapClientMethod()
on
the SoapCall.getSoapClient()
with the arguments retrieved from
SoapCall.getSoapArgs()
.SoapClientHandlerInterface
Modifier | Constructor and Description |
---|---|
protected |
SoapClientHandler()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Method |
getSoapClientMethod(T soapClient,
Method method)
Gets the method from the SOAP client that matches the supplied method.
|
protected Object |
invoke(SoapCall<T> soapCall)
Takes a
SoapCall object and invokes the method by reflection. |
protected Object[] |
processSoapArguments(Method soapClientMethod,
Object[] args)
Processes the arguments such that they will be ready to be passed into the
supplied SOAP client method.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearHeaders, createSoapClient, createSoapHeaderElement, getEndpointAddress, getHeader, invokeSoapCall, putAllHttpHeaders, setCompression, setEndpointAddress, setHeader, setRequestTimeout
protected Object[] processSoapArguments(Method soapClientMethod, Object[] args)
In the default implementation of processing arguments, if the number of
arguments is too small, the argument list will be padded with null
.
If args
is null
, null
will be returned.
soapClientMethod
- the SOAP client method that will be called with the
args
args
- the arguments that will be processedsoapClientMethod
.public Method getSoapClientMethod(T soapClient, Method method) throws NoSuchMethodException
In the default implementation, only the method name and return type will be matched.
getSoapClientMethod
in interface SoapClientHandlerInterface<T>
soapClient
- the SOAP client within which to search for the methodmethod
- the method to matchNoSuchMethodException
- thrown if the SOAP client does not contain
the requested method.
TODO(api.arogal): Needs to check parameter types as well as name/return.protected Object invoke(SoapCall<T> soapCall) throws Exception
SoapCall
object and invokes the method by reflection.soapCall
- contains the SOAP method, SOAP client, and args to be
calledException
- thrown if calling the operation on the remote service
failsCopyright © 2018. All Rights Reserved.