Class WebServiceSender

All Implemented Interfaces:
CanUseSharedResource<HttpSession>, HasPhysicalDestination, IConfigurable, IConfigurationAware, INamedObject, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, HasKeystore, HasTruststore, ConfigurableLifecycle, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle

public class WebServiceSender extends HttpSender
Sender that sends a message via a WebService.
Since:
7.0
Version:
2.0
Author:
Gerrit van Brakel, Niels Meijer
  • Constructor Details

    • WebServiceSender

      public WebServiceSender()
  • Method Details

    • getLogPrefix

      public String getLogPrefix()
      Description copied from class: HttpSenderBase
      Returns the true name of the class and not XsltPipe$$EnhancerBySpringCGLIB$$563e6b5d. ClassUtils.nameOf(Object) makes sure the original class will be used.
      Overrides:
      getLogPrefix in class HttpSenderBase
      Returns:
      className + name of the ISender
    • configure

      public void configure() throws ConfigurationException
      Description copied from interface: ConfigurableLifecycle
      Configure this component.

      In the case of a container, this will propagate the start signal to all components that apply.

      Specified by:
      configure in interface ConfigurableLifecycle
      Specified by:
      configure in interface IConfigurable
      Specified by:
      configure in interface ISender
      Overrides:
      configure in class HttpSender
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • getMethod

      protected org.apache.http.client.methods.HttpRequestBase getMethod(URI uri, Message message, ParameterValueList parameters, PipeLineSession session) throws SenderException
      Description copied from class: HttpSenderBase
      Custom implementation to create a HttpRequest object.
      Overrides:
      getMethod in class HttpSender
      Parameters:
      uri - endpoint to send the message to
      message - to be sent
      parameters - ParameterValueList that contains all the senders parameters
      session - PipeLineSession to retrieve or store data from, or NULL when not set
      Returns:
      a HttpRequest object
      Throws:
      SenderException
    • extractResult

      protected Message extractResult(HttpResponseHandler responseHandler, PipeLineSession session) throws SenderException, IOException
      Description copied from class: HttpSenderBase
      Custom implementation to extract the response and format it to a String result.
      It is important that the response will be read or will be closed.
      Overrides:
      extractResult in class HttpSender
      Parameters:
      responseHandler - HttpResponseHandler that contains the response information
      session - PipeLineSession which may be null
      Returns:
      a string that will be passed to the pipeline
      Throws:
      SenderException
      IOException
    • setSoap

      public void setSoap(boolean b)
      when true, messages sent are put in a soap envelope and the soap envelope is removed from received messages (soap envelope will not be visible to the pipeline)
      Default value
      true
    • setMethodType

      @Protected public void setMethodType(HttpSenderBase.HttpMethod method)
      Hide this property from being set. SOAP should always be POST
      Overrides:
      setMethodType in class HttpSenderBase
    • setSoapActionURI

      @Deprecated @ConfigurationWarning("the attribute \'soapActionURI\' has been renamed to \'soapAction\'") public void setSoapActionURI(String soapAction)
      Deprecated.
    • setSoapActionURIParam

      @Deprecated @ConfigurationWarning("the attribute \'soapActionURIParam\' has been renamed to \'soapActionParam\'") public void setSoapActionURIParam(String soapActionParam)
      Deprecated.
    • setSoapAction

      public void setSoapAction(String soapAction)
      the soapactionuri to be set in the requestheader
    • setSoapActionParam

      public void setSoapActionParam(String soapActionParam)
      parameter to obtain the soapactionuri
    • setEncodingStyleURI

      @Deprecated @ConfigurationWarning("the attribute \'encodingStyleURI\' has been renamed to \'encodingStyle\'") public void setEncodingStyleURI(String encodingStyle)
      Deprecated.
    • setEncodingStyle

      public void setEncodingStyle(String encodingStyle)
      the encodingstyle to be set in the messageheader
    • setThrowApplicationFaults

      public void setThrowApplicationFaults(boolean b)
      controls whether soap faults generated by the application generate an exception, or are treated as 'normal' messages
      Default value
      true
    • setServiceNamespaceURI

      @Deprecated @ConfigurationWarning("the attribute \'serviceNamespaceURI\' has been renamed to \'serviceNamespace\'") public void setServiceNamespaceURI(String serviceNamespace)
      Deprecated.
    • setServiceNamespace

      public void setServiceNamespace(String serviceNamespace)
      the namespace of the message sent. identifies the service to be called. may be overriden by an actual namespace setting in the message to be sent
    • setServiceNamespaceURIParam

      @Deprecated @ConfigurationWarning("the attribute \'serviceNamespaceURIParam\' has been renamed to \'serviceNamespaceParam\'") public void setServiceNamespaceURIParam(String serviceNamespaceParam)
      Deprecated.
    • setServiceNamespaceParam

      public void setServiceNamespaceParam(String serviceNamespaceParam)
      parameter to obtain the servicenamespace
    • setNamespaceDefs

      public void setNamespaceDefs(String namespaceDefs)
      namespace defintions to be added in the soap envelope tag. must be in the form of a comma or space separated list of prefix=namespaceuri-definitions
    • setWssUserName

      public void setWssUserName(String string)
      username used to obtain credentials for authentication to web services security
    • setWssPassword

      public void setWssPassword(String string)
      password used to obtain credentials for authentication to web services security
    • setWssAuthAlias

      public void setWssAuthAlias(String string)
      alias used to obtain credentials for authentication to web services security
    • setWssPasswordDigest

      public void setWssPasswordDigest(boolean b)
      when true, the password is sent digested. otherwise it is sent in clear text
      Default value
      true
    • isSoap

      public boolean isSoap()
    • getSoapAction

      public String getSoapAction()
    • getSoapActionParam

      public String getSoapActionParam()
    • getEncodingStyle

      public String getEncodingStyle()
    • getServiceNamespace

      public String getServiceNamespace()
    • getServiceNamespaceParam

      public String getServiceNamespaceParam()
    • getNamespaceDefs

      public String getNamespaceDefs()
    • isThrowApplicationFaults

      public boolean isThrowApplicationFaults()
    • getWssAuthAlias

      public String getWssAuthAlias()
    • getWssUserName

      public String getWssUserName()
    • getWssPassword

      public String getWssPassword()
    • isWssPasswordDigest

      public boolean isWssPasswordDigest()