Package org.frankframework.soap
Class SoapWrapperPipe
java.lang.Object
org.frankframework.core.TransactionAttributes
org.frankframework.pipes.AbstractPipe
org.frankframework.pipes.FixedForwardPipe
org.frankframework.soap.SoapWrapperPipe
- All Implemented Interfaces:
HasTransactionAttribute
,IConfigurable
,IConfigurationAware
,IForwardTarget
,INamedObject
,IPipe
,IScopeProvider
,IWithParameters
,IWrapperPipe
,EventThrowing
,HasStatistics
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.frankframework.core.IWrapperPipe
IWrapperPipe.Direction
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final SoapVersion
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
checks for correct configuration of forwarddoPipe
(Message message, PipeLineSession session) This is where the action takes place.getRoot()
boolean
boolean
boolean
boolean
boolean
boolean
void
setAllowPlainXml
(boolean allowPlainXml) For direction=unwrap
only: if true, allow unwrapped xml toovoid
void
setEncodingStyle
(String string) The encodingStyle to be set in the soap headervoid
setIgnoreSoapFault
(boolean b) (only used when direction=unwrap
) Iffalse
and the soap body contains a soap fault, a PipeRunException is thrownvoid
setOmitXmlDeclaration
(boolean b) For direction=wrap
only: When false, adds an XML declaration to the output message.void
setOutputNamespace
(String string) (only used when direction=wrap
) If not empty, this namespace is added to the root element in the soap bodyvoid
setRemoveOutputNamespaces
(boolean b) (only used when direction=unwrap
) Iftrue
, namespaces (and prefixes) in the content of the soap body are removedvoid
setRemoveUnusedOutputNamespaces
(boolean b) (only used when direction=unwrap
andremoveoutputnamespaces=false
) Iftrue
, unused namespaces in the content of the soap body are removedvoid
If not empty, the root element in the soap body is changed to this valuevoid
setServiceNamespace
(String string) The default for the namespace of the message sent.void
setSoapBodyStyleSheet
(String string) (only used when direction=wrap
) Stylesheet to apply to the input message.void
setSoapHeaderSessionKey
(String string) Key of session variable to store soap headervoid
setSoapHeaderStyleSheet
(String string) (only used when direction=wrap
) Stylesheet to create the content of the soap header.void
setSoapNamespace
(String soapNamespace) (only used when direction=wrap
) Namespace of the soap envelopevoid
setSoapNamespaceSessionKey
(String string) Key of session variable to store auto-detected soapNamespacevoid
setSoapVersion
(SoapVersion value) Soap version to usevoid
setWssAuthAlias
(String string) alias used to obtain credentials for authentication to WebServiceSecurityvoid
setWssPassword
(String string) Default password for WebServiceSecurityvoid
setWssPasswordDigest
(boolean b) If true, the password is sent digested; Otherwise it is sent in clear textvoid
setWssUserName
(String string) Default username for WebServiceSecurityvoid
start()
Perform necessary action to start the pipe.void
stop()
Perform necessary actions to stop thePipe
.
For instance, closing JMS connections, DBMS connections etc.protected Message
unwrapMessage
(Message message, PipeLineSession session) protected Message
wrapMessage
(Message message, String soapHeader, PipeLineSession session) 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
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, registerForward, 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
consumesSessionVariable, getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getForwards, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getLocker, getLogIntermediaryResults, getMaxThreads, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, registerEvent, registerForward, 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.IWrapperPipe
setName
-
Field Details
-
DEFAULT_SOAP_HEADER_SESSION_KEY
- See Also:
-
DEFAULT_SOAP_NAMESPACE_SESSION_KEY
- See Also:
-
DEFAULT_SOAP_VERSION_FOR_WRAPPING
-
-
Constructor Details
-
SoapWrapperPipe
public SoapWrapperPipe()
-
-
Method Details
-
configure
Description copied from class:FixedForwardPipe
checks for correct configuration of forward- Specified by:
configure
in interfaceIConfigurable
- Specified by:
configure
in interfaceIPipe
- Overrides:
configure
in classFixedForwardPipe
- Throws:
ConfigurationException
-
start
Description copied from interface:IPipe
Perform necessary action to start the pipe. This method is executed after theIPipe.configure()
method, for each start and stop command of the adapter.- Specified by:
start
in interfaceIPipe
- Overrides:
start
in classAbstractPipe
- Throws:
PipeStartException
-
stop
public void stop()Description copied from interface:IPipe
Perform necessary actions to stop thePipe
.
For instance, closing JMS connections, DBMS connections etc.- Specified by:
stop
in interfaceIPipe
- Overrides:
stop
in classAbstractPipe
-
doPipe
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 theFixedResultPipe
, the Pipe can schedule the input to be closed at session exit, by callingMessage.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 interfaceIPipe
- Throws:
PipeRunException
-
unwrapMessage
protected Message unwrapMessage(Message message, PipeLineSession session) throws IOException, TransformerException, SAXException -
wrapMessage
protected Message wrapMessage(Message message, String soapHeader, PipeLineSession session) throws IOException - Throws:
IOException
-
setDirection
-
setSoapVersion
Soap version to use- Default value
- auto
-
setSoapNamespace
(only used when direction=wrap
) Namespace of the soap envelope- Default value
- auto determined from soapVersion
-
setSoapNamespaceSessionKey
Key of session variable to store auto-detected soapNamespace- Default value
- If configured as Pipeline Input Wrapper or PipeLine Output Wrapper: "soapNamespace"
-
setSoapHeaderSessionKey
Key of session variable to store soap header- Default value
- If configured as Pipeline Input Wrapper and direction=
unwrap
: "soapHeader"
-
setEncodingStyle
The encodingStyle to be set in the soap header -
setServiceNamespace
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
(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
(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
) Iftrue
, 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
andremoveoutputnamespaces=false
) Iftrue
, unused namespaces in the content of the soap body are removed- Default value
- true
-
setOutputNamespace
(only used when direction=wrap
) If not empty, this namespace is added to the root element in the soap body -
setRoot
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
) Iffalse
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
alias used to obtain credentials for authentication to WebServiceSecurity -
setWssUserName
Default username for WebServiceSecurity- Default value
-
setWssPassword
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
-
getSoapVersion
-
getSoapNamespace
-
getSoapNamespaceSessionKey
-
getSoapHeaderSessionKey
-
getEncodingStyle
-
getServiceNamespace
-
getSoapHeaderStyleSheet
-
getSoapBodyStyleSheet
-
isRemoveOutputNamespaces
public boolean isRemoveOutputNamespaces() -
isRemoveUnusedOutputNamespaces
public boolean isRemoveUnusedOutputNamespaces() -
getOutputNamespace
-
getRoot
-
isIgnoreSoapFault
public boolean isIgnoreSoapFault() -
isAllowPlainXml
public boolean isAllowPlainXml() -
isOmitXmlDeclaration
public boolean isOmitXmlDeclaration() -
getWssAuthAlias
-
getWssUserName
-
getWssPassword
-
isWssPasswordDigest
public boolean isWssPasswordDigest()
-