Class WebServiceGatewaySupport
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
Requires a WebServiceMessageFactory
or a WebServiceTemplate
instance to be set. It will create its
own WebServiceTemplate
if WebServiceMessageFactory
is passed in.
In addition to the message factory property, this gateway offers Marshaller
and Unmarshaller
properties. Setting these is required when the marshalling
methods
of the template are to be used.
Note that when injecting a
directly,
the convenience setters (WebServiceTemplate
setMarshaller(Marshaller)
, setUnmarshaller(Unmarshaller)
,
setMessageSender(WebServiceMessageSender)
, setMessageSenders(WebServiceMessageSender[])
, and
setDefaultUri(String)
) should not be used on this class, but on the template directly.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.logging.Log
Logger available to subclasses. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new instance of theWebServiceGatewaySupport
class, with a defaultWebServiceTemplate
.protected
WebServiceGatewaySupport
(WebServiceMessageFactory messageFactory) Creates a newWebServiceGatewaySupport
instance based on the given message factory. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
final String
Returns the default URI used by the gateway.final DestinationProvider
Returns the destination provider used by the gateway.final ClientInterceptor[]
Returns theClientInterceptors
used by the template.final org.springframework.oxm.Marshaller
Returns theMarshaller
used by the gateway.final WebServiceMessageFactory
Returns theWebServiceMessageFactory
used by the gateway.final WebServiceMessageSender[]
Returns theWebServiceMessageSender
s used by the gateway.final org.springframework.oxm.Unmarshaller
Returns theUnmarshaller
used by the gateway.final WebServiceTemplate
Returns theWebServiceTemplate
for the gateway.protected void
Subclasses can override this for custom initialization behavior.final void
setDefaultUri
(String uri) Sets the default URI used by the gateway.final void
setDestinationProvider
(DestinationProvider destinationProvider) Set the destination provider URI used by the gateway.final void
setInterceptors
(ClientInterceptor[] interceptors) Sets theClientInterceptors
used by the gateway.final void
setMarshaller
(org.springframework.oxm.Marshaller marshaller) Sets theMarshaller
used by the gateway.final void
setMessageFactory
(WebServiceMessageFactory messageFactory) Set theWebServiceMessageFactory
to be used by the gateway.final void
setMessageSender
(WebServiceMessageSender messageSender) Sets a singleWebServiceMessageSender
to be used by the gateway.final void
setMessageSenders
(WebServiceMessageSender[] messageSenders) Sets multipleWebServiceMessageSender
to be used by the gateway.final void
setUnmarshaller
(org.springframework.oxm.Unmarshaller unmarshaller) Sets theUnmarshaller
used by the gateway.final void
setWebServiceTemplate
(WebServiceTemplate webServiceTemplate) Sets theWebServiceTemplate
to be used by the gateway.
-
Field Details
-
logger
protected final org.apache.commons.logging.Log loggerLogger available to subclasses.
-
-
Constructor Details
-
WebServiceGatewaySupport
protected WebServiceGatewaySupport()Creates a new instance of theWebServiceGatewaySupport
class, with a defaultWebServiceTemplate
. -
WebServiceGatewaySupport
Creates a newWebServiceGatewaySupport
instance based on the given message factory.- Parameters:
messageFactory
- the message factory to use
-
-
Method Details
-
getMessageFactory
Returns theWebServiceMessageFactory
used by the gateway. -
setMessageFactory
Set theWebServiceMessageFactory
to be used by the gateway. -
getDefaultUri
Returns the default URI used by the gateway. -
setDefaultUri
Sets the default URI used by the gateway. -
getDestinationProvider
Returns the destination provider used by the gateway. -
setDestinationProvider
Set the destination provider URI used by the gateway. -
setMessageSender
Sets a singleWebServiceMessageSender
to be used by the gateway. -
getMessageSenders
Returns theWebServiceMessageSender
s used by the gateway. -
setMessageSenders
Sets multipleWebServiceMessageSender
to be used by the gateway. -
getWebServiceTemplate
Returns theWebServiceTemplate
for the gateway. -
setWebServiceTemplate
Sets theWebServiceTemplate
to be used by the gateway.When using this property, the convenience setters (
setMarshaller(Marshaller)
,setUnmarshaller(Unmarshaller)
,setMessageSender(WebServiceMessageSender)
,setMessageSenders(WebServiceMessageSender[])
, andsetDefaultUri(String)
) should not be set on this class, but on the template directly. -
getMarshaller
public final org.springframework.oxm.Marshaller getMarshaller()Returns theMarshaller
used by the gateway. -
setMarshaller
public final void setMarshaller(org.springframework.oxm.Marshaller marshaller) Sets theMarshaller
used by the gateway. Setting this property is only required if the marshalling functionality ofWebServiceTemplate
is to be used. -
getUnmarshaller
public final org.springframework.oxm.Unmarshaller getUnmarshaller()Returns theUnmarshaller
used by the gateway. -
setUnmarshaller
public final void setUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller) Sets theUnmarshaller
used by the gateway. Setting this property is only required if the marshalling functionality ofWebServiceTemplate
is to be used. -
getInterceptors
Returns theClientInterceptors
used by the template. -
setInterceptors
Sets theClientInterceptors
used by the gateway. -
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
initGateway
Subclasses can override this for custom initialization behavior. Gets called after population of this instance's bean properties.- Throws:
Exception
- if initialization fails
-