Class SoapValidator

All Implemented Interfaces:
HasSpecialDefaultValues, HasPhysicalDestination, HasTransactionAttribute, IConfigurable, IConfigurationAware, IDualModeValidator, IForwardTarget, INamedObject, IPipe, IScopeProvider, IValidator, IWithParameters, IXmlValidator, EventThrowing, HasStatistics, SchemasProvider, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
WsdlXmlValidator

public class SoapValidator extends Json2XmlValidator
XmlValidator that will automatically add the SOAP envelope XSD to the set of XSD's used for validation. Before the outputSoapBody attribute was introduced, two validators were used for a request-reply pattern (an inputValidator for the request and an outputValidator for the reply). These inputValidator and outputValidator were identical except for the child element of the SOAP body. Because validators use relatively a lot of memory, the outputSoapBody attribute was added which replaces the outputValidator. Both the request and the reply are then validated by the inputValidator.

To generate a wsdl with a soap action included one of the following properties must be set to the expected soapAction

wsdl.${adapterName}.${listenerName}.soapAction
wsdl.${adapterName}.soapAction
wsdl.soapAction
Author:
Michiel Meeuwissen, Jaco de Groot
  • Field Details

    • addSoapEnvelopeToSchemaLocation

      protected boolean addSoapEnvelopeToSchemaLocation
  • Constructor Details

    • SoapValidator

      public SoapValidator()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from class: XmlValidator
      Configure the XmlValidator
      Specified by:
      configure in interface IConfigurable
      Specified by:
      configure in interface IPipe
      Overrides:
      configure in class Json2XmlValidator
      Throws:
      ConfigurationException - when:
      • the schema cannot be found
        • <XmlValidator.isThrowException() is false and there is no forward defined for "failure"
        • when the parser does not accept setting the properties for validating
    • createRootValidation

      protected RootValidations createRootValidation(String messageRoot)
      Overrides:
      createRootValidation in class XmlValidator
    • isConfiguredForMixedValidation

      protected boolean isConfiguredForMixedValidation()
      Overrides:
      isConfiguredForMixedValidation in class XmlValidator
    • setSchema

      @Deprecated public void setSchema(String schema)
      Deprecated.
      Description copied from class: XmlValidator
      The filename of the schema on the classpath. It is not possible to specify a namespace using this attribute. (effectively the same as noNamespaceSchemaLocation) An example value would be "xml/xsd/GetPartyDetail.xsd". The value of the schema attribute is only used if the schemaLocation attribute and the noNamespaceSchemaLocation are not set.
      Overrides:
      setSchema in class XmlValidator
    • setNoNamespaceSchemaLocation

      public void setNoNamespaceSchemaLocation(String noNamespaceSchemaLocation)
      Description copied from class: XmlValidator
      A uri reference as a hint as to the location of a schema document with no target namespace.
      Overrides:
      setNoNamespaceSchemaLocation in class XmlValidator
    • getMessageRoot

      public String getMessageRoot()
      Specified by:
      getMessageRoot in interface IXmlValidator
      Overrides:
      getMessageRoot in class XmlValidator
    • getResponseRoot

      public String getResponseRoot()
      Overrides:
      getResponseRoot in class AbstractValidator
    • getRoot

      public String getRoot()
      Overrides:
      getRoot in class AbstractValidator
    • setRoot

      @Deprecated public void setRoot(String r)
      Deprecated.
      always envelope (not allowed to change)
      Overrides:
      setRoot in class XmlValidator
      Default value
      envelope
    • setSoapBody

      public void setSoapBody(String soapBody)
      Name of the child element of the SOAP body, or a comma separated list of names to choose from (only one is allowed) (wsdl generator will use the first element) (use empty value to allow an empty soap body, for example to allow element x and an empty soap body use: x,)
    • setOutputSoapBody

      public void setOutputSoapBody(String outputSoapBody)
      Identical to the soapBody attribute except that it's used for the output message instead of the input message. For more information see <a href=\"#note1\">note 1
    • setSoapHeader

      public void setSoapHeader(String soapHeader)
      Name of the child element of the SOAP header, or a comma separated list of names to choose from (only one is allowed) (wsdl generator will use the first element) (use empty value to allow an empty soap header, for example to allow element x and an empty soap header use: x,)
    • setSoapHeaderNamespace

      public void setSoapHeaderNamespace(String soapHeaderNamespace)
      Can be used when the SOAP header element exists multiple times
    • setSoapVersion

      public void setSoapVersion(SoapVersion soapVersion)
      SOAP envelope XSD version to use
      Default value
      1.1
    • setAllowPlainXml

      public void setAllowPlainXml(boolean allowPlainXml)
      Allow plain XML, without a SOAP Envelope, too. Be aware that setting this true inhibits the capability to test for exit specific response roots in SOAP messages
      Default value
      false
    • setIgnoreUnknownNamespaces

      public void setIgnoreUnknownNamespaces(Boolean ignoreUnknownNamespaces)
      Ignore namespaces in the input message which are unknown. If the XSD used has elementFormDefault=unqualified, it is necessary to set this to true. Be aware, however, that this will inhibit the validator to detect validation failures of namespaceless subelements of the SoapBody.
      Overrides:
      setIgnoreUnknownNamespaces in class XmlValidator
      Default value
      true when schema or noNamespaceSchemaLocation is used, false otherwise
    • getSoapBody

      public String getSoapBody()
    • getOutputSoapBody

      public String getOutputSoapBody()
    • getSoapHeader

      public String getSoapHeader()
    • getSoapHeaderNamespace

      public String getSoapHeaderNamespace()
    • getSoapVersion

      public SoapVersion getSoapVersion()
    • isAllowPlainXml

      public boolean isAllowPlainXml()