Class WebServiceGatewaySupport

java.lang.Object
org.springframework.ws.client.core.support.WebServiceGatewaySupport
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

public abstract class WebServiceGatewaySupport extends Object implements org.springframework.beans.factory.InitializingBean
Convenient super class for application classes that need Web service access.

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 WebServiceTemplate directly, the convenience setters (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 Details

    • logger

      protected final org.apache.commons.logging.Log logger
      Logger available to subclasses.
  • Constructor Details

    • WebServiceGatewaySupport

      protected WebServiceGatewaySupport()
      Creates a new instance of the WebServiceGatewaySupport class, with a default WebServiceTemplate.
    • WebServiceGatewaySupport

      protected WebServiceGatewaySupport(WebServiceMessageFactory messageFactory)
      Creates a new WebServiceGatewaySupport instance based on the given message factory.
      Parameters:
      messageFactory - the message factory to use
  • Method Details

    • getMessageFactory

      public final WebServiceMessageFactory getMessageFactory()
      Returns the WebServiceMessageFactory used by the gateway.
    • setMessageFactory

      public final void setMessageFactory(WebServiceMessageFactory messageFactory)
      Set the WebServiceMessageFactory to be used by the gateway.
    • getDefaultUri

      public final String getDefaultUri()
      Returns the default URI used by the gateway.
    • setDefaultUri

      public final void setDefaultUri(String uri)
      Sets the default URI used by the gateway.
    • getDestinationProvider

      public final DestinationProvider getDestinationProvider()
      Returns the destination provider used by the gateway.
    • setDestinationProvider

      public final void setDestinationProvider(DestinationProvider destinationProvider)
      Set the destination provider URI used by the gateway.
    • setMessageSender

      public final void setMessageSender(WebServiceMessageSender messageSender)
      Sets a single WebServiceMessageSender to be used by the gateway.
    • getMessageSenders

      public final WebServiceMessageSender[] getMessageSenders()
      Returns the WebServiceMessageSenders used by the gateway.
    • setMessageSenders

      public final void setMessageSenders(WebServiceMessageSender[] messageSenders)
      Sets multiple WebServiceMessageSender to be used by the gateway.
    • getWebServiceTemplate

      public final WebServiceTemplate getWebServiceTemplate()
      Returns the WebServiceTemplate for the gateway.
    • setWebServiceTemplate

      public final void setWebServiceTemplate(WebServiceTemplate webServiceTemplate)
      Sets the WebServiceTemplate to be used by the gateway.

      When using this property, the convenience setters (setMarshaller(Marshaller), setUnmarshaller(Unmarshaller), setMessageSender(WebServiceMessageSender), setMessageSenders(WebServiceMessageSender[]), and setDefaultUri(String)) should not be set on this class, but on the template directly.

    • getMarshaller

      public final org.springframework.oxm.Marshaller getMarshaller()
      Returns the Marshaller used by the gateway.
    • setMarshaller

      public final void setMarshaller(org.springframework.oxm.Marshaller marshaller)
      Sets the Marshaller used by the gateway. Setting this property is only required if the marshalling functionality of WebServiceTemplate is to be used.
      See Also:
    • getUnmarshaller

      public final org.springframework.oxm.Unmarshaller getUnmarshaller()
      Returns the Unmarshaller used by the gateway.
    • setUnmarshaller

      public final void setUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller)
      Sets the Unmarshaller used by the gateway. Setting this property is only required if the marshalling functionality of WebServiceTemplate is to be used.
      See Also:
    • getInterceptors

      public final ClientInterceptor[] getInterceptors()
      Returns the ClientInterceptors used by the template.
    • setInterceptors

      public final void setInterceptors(ClientInterceptor[] interceptors)
      Sets the ClientInterceptors used by the gateway.
    • afterPropertiesSet

      public final void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • initGateway

      protected void initGateway() throws Exception
      Subclasses can override this for custom initialization behavior. Gets called after population of this instance's bean properties.
      Throws:
      Exception - if initialization fails