Package org.frankframework.soap
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
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.frankframework.pipes.XmlValidator
XmlValidator.ResponseValidatorWrapper
-
Field Summary
Fields inherited from class org.frankframework.pipes.Json2XmlValidator
INPUT_FORMAT_SESSION_KEY_PREFIX
Fields inherited from class org.frankframework.pipes.XmlValidator
configurationException, validator
Fields inherited from class org.frankframework.pipes.AbstractPipe
parameterNamesMustBeUnique
Fields inherited from class org.frankframework.core.TransactionAttributes
log
Fields inherited from interface org.frankframework.core.IPipe
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure the XmlValidatorprotected RootValidations
createRootValidation
(String messageRoot) getRoot()
boolean
protected boolean
void
setAllowPlainXml
(boolean allowPlainXml) Allow plain XML, without a SOAP Envelope, too.void
setIgnoreUnknownNamespaces
(Boolean ignoreUnknownNamespaces) Ignore namespaces in the input message which are unknown.void
setNoNamespaceSchemaLocation
(String noNamespaceSchemaLocation) A uri reference as a hint as to the location of a schema document with no target namespace.void
setOutputSoapBody
(String outputSoapBody) Identical to thesoapBody
attribute except that it's used for the output message instead of the input message.void
Deprecated.void
Deprecated.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,)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,)void
setSoapHeaderNamespace
(String soapHeaderNamespace) Can be used when the SOAP header element exists multiple timesvoid
setSoapVersion
(SoapVersion soapVersion) SOAP envelope XSD version to useMethods inherited from class org.frankframework.pipes.Json2XmlValidator
addNamespace, alignJson, alignXml2Json, createJsonSchema, createJsonSchema, doPipe, getDomain, getInputFormatSessionKey, getJsonRootValidations, getOutputFormat, getOutputFormat, getOutputFormatSessionKey, getPhysicalDestinationName, getTargetNamespace, isAcceptNamespacelessXml, isAllowJson, isAutoFormat, isCompactJsonArrays, isDeepSearch, isFailOnWildcards, isIgnoreUndeclaredElements, isJsonWithRootElements, isProduceNamespacelessXml, isStrictJsonArraySyntax, isValidateJsonToRootElementOnly, setAcceptNamespacelessXml, setAcceptNamespaceLessXml, setAllowJson, setAutoFormat, setCompactJsonArrays, setDeepSearch, setFailOnWildcards, setIgnoreUndeclaredElements, setInputFormatSessionKey, setJsonWithRootElements, setOutputFormat, setOutputFormatSessionKey, setProduceNamespacelessXml, setProduceNamespaceLessXml, setStrictJsonArraySyntax, setTargetNamespace, setValidateJsonToRootElementOnly, storeInputFormat
Methods inherited from class org.frankframework.pipes.XmlValidator
addInvalidRootNamespaces, addRequestRootValidation, addResponseRootValidation, afterPropertiesSet, checkSchemaSpecified, determineForward, getCharset, getConfigurationException, getDocumentation, getErrorResult, getIgnoreUnknownNamespaces, getImportedNamespacesToIgnore, getImportedSchemaLocationsToIgnore, getInvalidRootNamespaces, getMessageRoot, getNoNamespaceSchemaLocation, getReasonSessionKey, getRequestRootValidations, getResponseRootValidations, getResponseValidator, getRootElementSessionKey, getRootNamespaceSessionKey, getRootValidations, getSchema, getSchemaLocation, getSchemas, getSchemas, getSchemas, getSchemasId, getSchemasId, getSoapNamespace, getSpecialDefaultValue, getXmlReasonSessionKey, getXsds, getXSModels, isAddNamespaceToSchema, isFullSchemaChecking, isThrowException, isUseBaseImportedSchemaLocationsToIgnore, isValidateFile, setAddNamespaceToSchema, setCharset, setFullSchemaChecking, setIgnoreCaching, setImplementation, setImportedNamespacesToIgnore, setImportedSchemaLocationsToIgnore, setReasonSessionKey, setResponseRoot, setRootElementSessionKey, setRootNamespaceSessionKey, setSchemaLocation, setSoapNamespace, setThrowException, setUseBaseImportedSchemaLocationsToIgnore, setValidateFile, setWarn, setXmlReasonSessionKey, setXmlSchemaVersion, start, stop, validate
Methods inherited from class org.frankframework.pipes.AbstractValidator
determineForward, doPipe, getSchemaSessionKey, isForwardFailureToSuccess, setForwardFailureToSuccess, setSchemaSessionKey, validate, validate
Methods inherited from class org.frankframework.pipes.FixedForwardPipe
getIfParam, getIfValue, getOnlyIfSessionKey, getOnlyIfValue, getParameterValue, getSuccessForward, getUnlessSessionKey, getUnlessValue, isSkipOnEmptyInput, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
Methods inherited from class org.frankframework.pipes.AbstractPipe
addForward, addParameter, consumesSessionVariable, createBean, findForward, getAdapter, getApplicationContext, getChompCharSize, getConfigurationClassLoader, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getEventSourceName, getForwards, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getLocker, getLogIntermediaryResults, getMaxThreads, getName, getParameterList, getPipeLine, getSecLogSessionKeys, getStoreResultInSessionKey, hasRegisteredForward, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, registerEvent, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setEventPublisher, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setName, setPipeLine, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, sizeStatisticsEnabled, throwEvent
Methods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, getTransactionAttribute, getTransactionTimeout, getTxDef, isTransacted, isTransacted, setTransacted, setTransactionAttribute, setTransactionTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.IConfigurationAware
getApplicationContext, getName
Methods inherited from interface org.frankframework.core.IForwardTarget
getName
Methods inherited from interface org.frankframework.core.INamedObject
getName
Methods inherited from interface org.frankframework.core.IPipe
addForward, consumesSessionVariable, doPipe, getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getForwards, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getLocker, getLogIntermediaryResults, getMaxThreads, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, registerEvent, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setPipeLine, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setStoreResultInSessionKey, setWriteToSecLog, sizeStatisticsEnabled, throwEvent, throwEvent
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.IValidator
setName, validate
-
Field Details
-
addSoapEnvelopeToSchemaLocation
protected boolean addSoapEnvelopeToSchemaLocation
-
-
Constructor Details
-
SoapValidator
public SoapValidator()
-
-
Method Details
-
configure
Description copied from class:XmlValidator
Configure the XmlValidator- Specified by:
configure
in interfaceIConfigurable
- Specified by:
configure
in interfaceIPipe
- Overrides:
configure
in classJson2XmlValidator
- 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
- Overrides:
createRootValidation
in classXmlValidator
-
isConfiguredForMixedValidation
protected boolean isConfiguredForMixedValidation()- Overrides:
isConfiguredForMixedValidation
in classXmlValidator
-
setSchema
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 classXmlValidator
-
setNoNamespaceSchemaLocation
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 classXmlValidator
-
getMessageRoot
- Specified by:
getMessageRoot
in interfaceIXmlValidator
- Overrides:
getMessageRoot
in classXmlValidator
-
getResponseRoot
- Overrides:
getResponseRoot
in classAbstractValidator
-
getRoot
- Overrides:
getRoot
in classAbstractValidator
-
setRoot
Deprecated.always envelope (not allowed to change)- Overrides:
setRoot
in classXmlValidator
- Default value
- envelope
-
setSoapBody
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
Identical to thesoapBody
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
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
Can be used when the SOAP header element exists multiple times -
setSoapVersion
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
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 classXmlValidator
- Default value
- true when
schema
ornoNamespaceSchemaLocation
is used, false otherwise
-
getSoapBody
-
getOutputSoapBody
-
getSoapHeader
-
getSoapHeaderNamespace
-
getSoapVersion
-
isAllowPlainXml
public boolean isAllowPlainXml()
-