T
- the client type for the SOAP toolkit, e.g., Stub
for Axis, BindingProvider
for JAX-WS, etc.public interface SoapClientHandlerInterface<T>
SoapServiceClient
use this handlers implementing these methods to interact with SOAP clients
from different frameworks. There is separate handler for each framework
that implements this interface.Modifier and Type | Method and Description |
---|---|
void |
clearHeaders(T soapClient)
Clears the headers of the SOAP client.
|
T |
createSoapClient(SoapServiceDescriptor soapServiceDescriptor)
Creates a SOAP client using the
soapServiceDescriptor . |
SOAPHeaderElement |
createSoapHeaderElement(QName qName)
Creates a SOAP header element object specific to the framework that this
handler works with.
|
String |
getEndpointAddress(T soapClient)
Gets the endpoint address on the SOAP client.
|
Object |
getHeader(T soapClient,
String headerName)
Gets the value of a header given the SOAP client and the header name.
|
Method |
getSoapClientMethod(T soapClient,
Method method)
Gets the method from the SOAP client that matches the supplied method.
|
RemoteCallReturn |
invokeSoapCall(SoapCall<T> soapCall)
Executes the
SoapCall , which has a reference to a
SoapClientHandlerInterface . |
void |
putAllHttpHeaders(T soapClient,
Map<String,String> headersMap)
Puts all headers into the existing HTTP headers of the SOAP client,
overwriting any existing header keys.
|
void |
setCompression(T soapClient,
boolean compress)
Sets if the SOAP client should use compression.
|
void |
setEndpointAddress(T soapClient,
String endpointAddress)
Sets the endpoint address on the SOAP client.
|
void |
setHeader(T soapClient,
String namespace,
String headerName,
Object headerValue)
Sets a header on the SOAP client.
|
void |
setRequestTimeout(T soapClient,
int timeout)
Sets the read timeout of the given SOAP client.
|
T createSoapClient(SoapServiceDescriptor soapServiceDescriptor) throws ServiceException
soapServiceDescriptor
.soapServiceDescriptor
- the service descriptor describing the service
that the SOAP client will be stubbed againstServiceException
- if there as a problem creating the SOAP clientRemoteCallReturn invokeSoapCall(SoapCall<T> soapCall)
SoapCall
, which has a reference to a
SoapClientHandlerInterface
.soapCall
- the SoapCall
to executevoid setEndpointAddress(T soapClient, String endpointAddress)
String getEndpointAddress(T soapClient)
void clearHeaders(T soapClient)
SOAPHeaderElement createSoapHeaderElement(QName qName)
qName
- qualified name of the header elementvoid setHeader(T soapClient, String namespace, String headerName, Object headerValue) throws ServiceException
soapClient
- the SOAP client to set the header ofnamespace
- the namespace of the headerheaderName
- the name of the headerheaderValue
- the value of the headerServiceException
- if there was a problem setting the headervoid putAllHttpHeaders(T soapClient, Map<String,String> headersMap)
soapClient
- the SOAP client to set the headers onheadersMap
- the map of headers in the form of header name to valueObject getHeader(T soapClient, String headerName)
void setCompression(T soapClient, boolean compress)
void setRequestTimeout(T soapClient, int timeout)
soapClient
- the SOAP client to set the read timeout fortimeout
- the timeout in millisecondsMethod getSoapClientMethod(T soapClient, Method method) throws NoSuchMethodException
In the default implementation, only the method name and return type will be matched.
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.Copyright © 2018. All Rights Reserved.