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:

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

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
      configure in class Json2XmlValidator
      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)
      createRootValidation in class XmlValidator
    • isConfiguredForMixedValidation

      protected boolean isConfiguredForMixedValidation()
      isConfiguredForMixedValidation in class XmlValidator
    • setSchema

      @Deprecated public void setSchema(String schema)
      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.
      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.
      setNoNamespaceSchemaLocation in class XmlValidator
    • getMessageRoot

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

      public String getResponseRoot()
      getResponseRoot in class ValidatorBase
    • getRoot

      public String getRoot()
      getRoot in class ValidatorBase
    • setRoot

      @Deprecated public void setRoot(String r)
      always envelope (not allowed to change)
      setRoot in class XmlValidator
      Default value
    • 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
    • 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
    • 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.
      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()