Class SoapWrapperPipe

All Implemented Interfaces:
HasTransactionAttribute, IConfigurable, IConfigurationAware, IForwardTarget, INamedObject, IPipe, IScopeProvider, IWithParameters, IWrapperPipe, EventThrowing, HasStatistics, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class SoapWrapperPipe extends FixedForwardPipe implements IWrapperPipe
Pipe to wrap or unwrap a message from/into a SOAP Envelope.
Author:
Peter Leeuwenburgh
Parameters
Any parameters defined on the pipe will be applied to the created transformer.
  • Field Details

    • DEFAULT_SOAP_HEADER_SESSION_KEY

      protected static final String DEFAULT_SOAP_HEADER_SESSION_KEY
      See Also:
    • DEFAULT_SOAP_NAMESPACE_SESSION_KEY

      protected static final String DEFAULT_SOAP_NAMESPACE_SESSION_KEY
      See Also:
    • DEFAULT_SOAP_VERSION_FOR_WRAPPING

      protected static final SoapVersion DEFAULT_SOAP_VERSION_FOR_WRAPPING
  • Constructor Details

    • SoapWrapperPipe

      public SoapWrapperPipe()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from class: FixedForwardPipe
      checks for correct configuration of forward
      Specified by:
      configure in interface IConfigurable
      Specified by:
      configure in interface IPipe
      Overrides:
      configure in class FixedForwardPipe
      Throws:
      ConfigurationException
    • start

      public void start()
      Description copied from interface: IPipe
      Perform necessary action to start the pipe. This method is executed after the IPipe.configure() method, for each start and stop command of the adapter.
      Specified by:
      start in interface IPipe
      Overrides:
      start in class AbstractPipe
    • stop

      public void stop()
      Description copied from interface: IPipe
      Perform necessary actions to stop the Pipe.
      For instance, closing JMS connections, DBMS connections etc.
      Specified by:
      stop in interface IPipe
      Overrides:
      stop in class AbstractPipe
    • doPipe

      public PipeRunResult doPipe(Message message, PipeLineSession session) throws PipeRunException
      Description copied from interface: IPipe
      This is where the action takes place. Pipes may only throw a PipeRunException, to be handled by the caller of this object. Implementations must either consume the message, or pass it on to the next Pipe in the PipeRunResult. If the result of the Pipe does not depend on the input, like for the FixedResultPipe, the Pipe can schedule the input to be closed at session exit, by calling Message.closeOnCloseOf(PipeLineSession, String) This allows the previous Pipe to release any resources (e.g. connections) that it might have kept open until the message was consumed. Doing so avoids connections leaking from pools, while it enables efficient streaming processing of data while it is being read from a stream.
      Specified by:
      doPipe in interface IPipe
      Throws:
      PipeRunException
    • unwrapMessage

      protected Message unwrapMessage(Message message, PipeLineSession session) throws IOException, TransformerException, SAXException
      Throws:
      IOException
      TransformerException
      SAXException
    • wrapMessage

      protected Message wrapMessage(Message message, String soapHeader, PipeLineSession session) throws IOException
      Throws:
      IOException
    • setDirection

      @Default("wrap") public void setDirection(IWrapperPipe.Direction value)
    • setSoapVersion

      public void setSoapVersion(SoapVersion value)
      Soap version to use
      Default value
      auto
    • setSoapNamespace

      public void setSoapNamespace(String soapNamespace)
      (only used when direction=wrap) Namespace of the soap envelope
      Default value
      auto determined from soapVersion
    • setSoapNamespaceSessionKey

      public void setSoapNamespaceSessionKey(String string)
      Key of session variable to store auto-detected soapNamespace
      Default value
      If configured as Pipeline Input Wrapper or PipeLine Output Wrapper: "soapNamespace"
    • setSoapHeaderSessionKey

      public void setSoapHeaderSessionKey(String string)
      Key of session variable to store soap header
      Default value
      If configured as Pipeline Input Wrapper and direction=unwrap: "soapHeader"
    • setEncodingStyle

      public void setEncodingStyle(String string)
      The encodingStyle to be set in the soap header
    • setServiceNamespace

      public void setServiceNamespace(String string)
      The default for 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
    • setSoapHeaderStyleSheet

      public void setSoapHeaderStyleSheet(String string)
      (only used when direction=wrap) Stylesheet to create the content of the soap header. As input for this stylesheet a dummy xml string is used. Note: outputType=xml and xsltVersion=
    • setSoapBodyStyleSheet

      public void setSoapBodyStyleSheet(String string)
      (only used when direction=wrap) Stylesheet to apply to the input message. Note: outputType=xml and xsltVersion=2
    • setRemoveOutputNamespaces

      public void setRemoveOutputNamespaces(boolean b)
      (only used when direction=unwrap) If true, namespaces (and prefixes) in the content of the soap body are removed
      Default value
      false
    • setRemoveUnusedOutputNamespaces

      public void setRemoveUnusedOutputNamespaces(boolean b)
      (only used when direction=unwrap and removeoutputnamespaces=false) If true, unused namespaces in the content of the soap body are removed
      Default value
      true
    • setOutputNamespace

      public void setOutputNamespace(String string)
      (only used when direction=wrap) If not empty, this namespace is added to the root element in the soap body
    • setRoot

      public void setRoot(String string)
      If not empty, the root element in the soap body is changed to this value
    • setIgnoreSoapFault

      public void setIgnoreSoapFault(boolean b)
      (only used when direction=unwrap) If false and the soap body contains a soap fault, a PipeRunException is thrown
      Default value
      false
    • setAllowPlainXml

      public void setAllowPlainXml(boolean allowPlainXml)
      For direction=unwrap only: if true, allow unwrapped xml too
      Default value
      false
    • setWssAuthAlias

      public void setWssAuthAlias(String string)
      alias used to obtain credentials for authentication to WebServiceSecurity
    • setWssUserName

      public void setWssUserName(String string)
      Default username for WebServiceSecurity
      Default value
    • setWssPassword

      public void setWssPassword(String string)
      Default password for WebServiceSecurity
      Default value
    • setWssPasswordDigest

      public void setWssPasswordDigest(boolean b)
      If true, the password is sent digested; Otherwise it is sent in clear text
      Default value
      true
    • setOmitXmlDeclaration

      public void setOmitXmlDeclaration(boolean b)
      For direction=wrap only: When false, adds an XML declaration to the output message.
      Default value
      true
    • getDirection

      public IWrapperPipe.Direction getDirection()
    • getSoapVersion

      public SoapVersion getSoapVersion()
    • getSoapNamespace

      public String getSoapNamespace()
    • getSoapNamespaceSessionKey

      public String getSoapNamespaceSessionKey()
    • getSoapHeaderSessionKey

      public String getSoapHeaderSessionKey()
    • getEncodingStyle

      public String getEncodingStyle()
    • getServiceNamespace

      public String getServiceNamespace()
    • getSoapHeaderStyleSheet

      public String getSoapHeaderStyleSheet()
    • getSoapBodyStyleSheet

      public String getSoapBodyStyleSheet()
    • isRemoveOutputNamespaces

      public boolean isRemoveOutputNamespaces()
    • isRemoveUnusedOutputNamespaces

      public boolean isRemoveUnusedOutputNamespaces()
    • getOutputNamespace

      public String getOutputNamespace()
    • getRoot

      public String getRoot()
    • isIgnoreSoapFault

      public boolean isIgnoreSoapFault()
    • isAllowPlainXml

      public boolean isAllowPlainXml()
    • isOmitXmlDeclaration

      public boolean isOmitXmlDeclaration()
    • getWssAuthAlias

      public String getWssAuthAlias()
    • getWssUserName

      public String getWssUserName()
    • getWssPassword

      public String getWssPassword()
    • isWssPasswordDigest

      public boolean isWssPasswordDigest()