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 (WebServiceTemplatesetMarshaller(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.LogLogger available to subclasses. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance of theWebServiceGatewaySupportclass, with a defaultWebServiceTemplate.protectedWebServiceGatewaySupport(WebServiceMessageFactory messageFactory) Creates a newWebServiceGatewaySupportinstance based on the given message factory. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal StringReturns the default URI used by the gateway.final DestinationProviderReturns the destination provider used by the gateway.final ClientInterceptor[]Returns theClientInterceptorsused by the template.final org.springframework.oxm.MarshallerReturns theMarshallerused by the gateway.final WebServiceMessageFactoryReturns theWebServiceMessageFactoryused by the gateway.final WebServiceMessageSender[]Returns theWebServiceMessageSenders used by the gateway.final org.springframework.oxm.UnmarshallerReturns theUnmarshallerused by the gateway.final WebServiceTemplateReturns theWebServiceTemplatefor the gateway.protected voidSubclasses can override this for custom initialization behavior.final voidsetDefaultUri(String uri) Sets the default URI used by the gateway.final voidsetDestinationProvider(DestinationProvider destinationProvider) Set the destination provider URI used by the gateway.final voidsetInterceptors(ClientInterceptor[] interceptors) Sets theClientInterceptorsused by the gateway.final voidsetMarshaller(org.springframework.oxm.Marshaller marshaller) Sets theMarshallerused by the gateway.final voidsetMessageFactory(WebServiceMessageFactory messageFactory) Set theWebServiceMessageFactoryto be used by the gateway.final voidsetMessageSender(WebServiceMessageSender messageSender) Sets a singleWebServiceMessageSenderto be used by the gateway.final voidsetMessageSenders(WebServiceMessageSender[] messageSenders) Sets multipleWebServiceMessageSenderto be used by the gateway.final voidsetUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller) Sets theUnmarshallerused by the gateway.final voidsetWebServiceTemplate(WebServiceTemplate webServiceTemplate) Sets theWebServiceTemplateto 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 theWebServiceGatewaySupportclass, with a defaultWebServiceTemplate. -
WebServiceGatewaySupport
Creates a newWebServiceGatewaySupportinstance based on the given message factory.- Parameters:
messageFactory- the message factory to use
-
-
Method Details
-
getMessageFactory
Returns theWebServiceMessageFactoryused by the gateway. -
setMessageFactory
Set theWebServiceMessageFactoryto 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 singleWebServiceMessageSenderto be used by the gateway. -
getMessageSenders
Returns theWebServiceMessageSenders used by the gateway. -
setMessageSenders
Sets multipleWebServiceMessageSenderto be used by the gateway. -
getWebServiceTemplate
Returns theWebServiceTemplatefor the gateway. -
setWebServiceTemplate
Sets theWebServiceTemplateto 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 theMarshallerused by the gateway. -
setMarshaller
public final void setMarshaller(org.springframework.oxm.Marshaller marshaller) Sets theMarshallerused by the gateway. Setting this property is only required if the marshalling functionality ofWebServiceTemplateis to be used. -
getUnmarshaller
public final org.springframework.oxm.Unmarshaller getUnmarshaller()Returns theUnmarshallerused by the gateway. -
setUnmarshaller
public final void setUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller) Sets theUnmarshallerused by the gateway. Setting this property is only required if the marshalling functionality ofWebServiceTemplateis to be used. -
getInterceptors
Returns theClientInterceptorsused by the template. -
setInterceptors
Sets theClientInterceptorsused by the gateway. -
afterPropertiesSet
- Specified by:
afterPropertiesSetin 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
-