Package org.frankframework.soap
Class SoapValidator
- All Implemented Interfaces:
FrankElement,HasApplicationContext,HasName,HasTransactionAttribute,IConfigurable,IDualModeValidator,IForwardTarget,IPipe,IScopeProvider,IValidator,IWithParameters,IXmlValidator,NameAware,EventThrowing,SchemasProvider,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle
- Direct Known Subclasses:
EsbSoapValidator,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
FieldsFields inherited from class org.frankframework.pipes.Json2XmlValidator
INPUT_FORMAT_SESSION_KEY_PREFIX, READ_AHEAD_LIMITFields inherited from class org.frankframework.pipes.XmlValidator
configurationException, validatorFields inherited from class org.frankframework.pipes.AbstractPipe
parameterNamesMustBeUniqueFields inherited from class org.frankframework.core.TransactionAttributes
logFields inherited from interface org.frankframework.core.IPipe
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure the XmlValidatorprotected RootValidationscreateRootValidation(String messageRoot) getRoot()protected booleanvoidsetAllowPlainXml(boolean allowPlainXml) Allow plain XML, without a SOAP Envelope, too.voidsetIgnoreUnknownNamespaces(Boolean ignoreUnknownNamespaces) Ignore namespaces in the input message which are unknown.voidsetNoNamespaceSchemaLocation(String noNamespaceSchemaLocation) A URI reference as a hint as to the location of a schema document with no target namespace.voidsetOutputSoapBody(String outputSoapBody) Identical to thesoapBodyattribute except that it's used for the output message instead of the input message.voidalways envelope (not allowed to change)voidThe filename of the schema on the classpath.voidsetSoapBody(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,)voidsetSoapHeader(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,)voidsetSoapHeaderNamespace(String soapHeaderNamespace) Can be used when the SOAP header element exists multiple timesvoidsetSoapVersion(SoapVersion soapVersion) SOAP envelope XSD version to useMethods inherited from class org.frankframework.pipes.Json2XmlValidator
addNamespace, alignJson, alignXml2Json, createJsonSchema, createJsonSchema, doPipe, getJsonRootValidations, getOutputFormat, setAcceptNamespacelessXml, setAcceptNamespaceLessXml, setAllowJson, setAutoFormat, setCompactJsonArrays, setDeepSearch, setFailOnWildcards, setIgnoreUndeclaredElements, setInputFormatSessionKey, setJsonWithRootElements, setOmitXmlDeclaration, setOutputFormat, setOutputFormatSessionKey, setProduceNamespacelessXml, setProduceNamespaceLessXml, setStrictJsonArraySyntax, setTargetNamespace, setValidateJsonToRootElementOnly, storeInputFormatMethods inherited from class org.frankframework.pipes.XmlValidator
addInvalidRootNamespaces, addRequestRootValidation, addResponseRootValidation, afterPropertiesSet, checkSchemaSpecified, determineForward, getCharset, getConfigurationException, getDocumentation, getErrorResult, getIgnoreUnknownNamespaces, getInvalidRootNamespaces, getMessageRoot, getReasonSessionKey, getRequestRootValidations, getResponseRootValidations, getResponseValidator, getRootValidations, getSchema, getSchemas, getSchemas, getSchemas, getSchemasId, getSchemasId, getSoapNamespace, getXmlReasonSessionKey, getXsds, getXSModels, isFullSchemaChecking, isThrowException, isValidateFile, setAddNamespaceToSchema, setCharset, setFullSchemaChecking, setIgnoreCaching, setImplementation, setImportedNamespacesToIgnore, setImportedSchemaLocationsToIgnore, setReasonSessionKey, setResponseRoot, setRootElementSessionKey, setRootNamespaceSessionKey, setSchemaLocation, setSoapNamespace, setThrowException, setUseBaseImportedSchemaLocationsToIgnore, setValidateFile, setWarn, setXmlReasonSessionKey, setXmlSchemaVersion, start, stop, validateMethods inherited from class org.frankframework.pipes.AbstractValidator
determineForward, doPipe, setForwardFailureToSuccess, setSchemaSessionKey, validate, validateMethods inherited from class org.frankframework.pipes.FixedForwardPipe
getParameterValue, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipeMethods inherited from class org.frankframework.pipes.AbstractPipe
addForward, addParameter, consumesSessionVariable, createBean, findForward, getAdapter, getEventSourceName, getForwards, getParameterList, hasRegisteredForward, isRunning, registerEvent, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setName, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, sizeStatisticsEnabled, throwEventMethods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.HasTransactionAttribute
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttributeMethods inherited from interface org.frankframework.core.IForwardTarget
getNameMethods 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, throwEventMethods inherited from interface org.frankframework.core.IValidator
setName, validateMethods inherited from interface org.frankframework.core.IXmlValidator
getSchemaLocationMethods inherited from interface org.springframework.context.Lifecycle
isRunning
-
Field Details
-
addSoapEnvelopeToSchemaLocation
protected boolean addSoapEnvelopeToSchemaLocation
-
-
Constructor Details
-
SoapValidator
public SoapValidator()
-
-
Method Details
-
configure
Description copied from class:XmlValidatorConfigure the XmlValidator- Specified by:
configurein interfaceIConfigurable- Overrides:
configurein classJson2XmlValidator- Throws:
ConfigurationException- when:- the schema cannot be found
XmlValidator.isThrowException()isfalseand there is no forward defined for "failure"- when the parser does not accept setting the properties for validating
-
createRootValidation
- Overrides:
createRootValidationin classXmlValidator
-
isConfiguredForMixedValidation
protected boolean isConfiguredForMixedValidation()- Overrides:
isConfiguredForMixedValidationin classXmlValidator
-
setSchema
Description copied from class:XmlValidatorThe 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:
setSchemain classXmlValidator
-
setNoNamespaceSchemaLocation
Description copied from class:XmlValidatorA URI reference as a hint as to the location of a schema document with no target namespace.- Overrides:
setNoNamespaceSchemaLocationin classXmlValidator
-
getMessageRoot
- Specified by:
getMessageRootin interfaceIXmlValidator- Overrides:
getMessageRootin classXmlValidator
-
getResponseRoot
-
getRoot
-
setRoot
always envelope (not allowed to change)- Overrides:
setRootin 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 thesoapBodyattribute except that it's used for the output message instead of the input message. -
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:
setIgnoreUnknownNamespacesin classXmlValidator- Default value
- true when
schemaornoNamespaceSchemaLocationis used, false otherwise
-