Class EsbSoapWrapperPipe

All Implemented Interfaces:
DestinationValidator, FrankElement, HasApplicationContext, HasName, HasTransactionAttribute, IConfigurable, IForwardTarget, IPipe, IScopeProvider, IWithParameters, IWrapperPipe, NameAware, EventThrowing, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle
Direct Known Subclasses:
FxfWrapperPipe

@Category(NN_SPECIAL) public class EsbSoapWrapperPipe extends SoapWrapperPipe implements DestinationValidator
Extension to SoapWrapperPipe for separate modes.

Configuration (where deviating from SoapWrapperPipe):

attributesdescriptiondefault
modeeither i2t (ifsa2tibco), reg (regular) or bis (Business Integration Services)reg
cmhVersion(only used when mode=reg) Common Message Header version (1 or 2)1 when mode=reg, 0 otherwise
soapHeaderSessionKeyif direction=unwrap: soapHeader
soapHeaderStyleSheetif direction=wrap and mode=i2t:/xml/xsl/esb/soapHeader.xsl
if direction=wrap and mode=reg:TODO (for now identical to the "i2t" SOAP Header)
if direction=wrap and mode=bis:/xml/xsl/esb/bisSoapHeader.xsl
soapBodyStyleSheetif direction=wrap and mode=reg:/xml/xsl/esb/soapBody.xsl
if direction=wrap and mode=bis:/xml/xsl/esb/bisSoapBody.xsl
addOutputNamespace(only used when direction=wrap) when true, outputNamespace is automatically set using the parameters (if $messagingLayer='P2P' then 'http://nn.nl/XSD/$businessDomain/$applicationName/$applicationFunction' else is serviceContext is not empty 'http://nn.nl/XSD/$businessDomain/$serviceName/$serviceContext/$serviceContextVersion/$operationName/$operationVersion' else 'http://nn.nl/XSD/$businessDomain/$serviceName/$serviceVersion/$operationName/$operationVersion')false
retrievePhysicalDestination(only used when direction=wrap) when true, the physical destination is retrieved from the queue instead of using the parameter destinationtrue
useFixedValuesIf true, the fields CorrelationId, MessageId and Timestamp will have a fixed value (for testing purposes only)false
fixResultNamespace(only used when direction=wrap) when true and the Result tag already exists, the namespace is changedfalse
p2pAliasWhen the messagingLayer part of the destination has this value interpret it as P2P
esbAliasWhen the messagingLayer part of the destination has this value interpret it as ESB

/xml/xsl/esb/soapHeader.xsl:

elementlevelvalue
MessageHeader0 
  xmlns=$namespace
From1 
Id2$fromId
To1 
Location2if $messagingLayer='P2P' then
 $messagingLayer.$businessDomain.$applicationName.$applicationFunction.$paradigm
else if $serviceContext is not empty then
 $messagingLayer.$businessDomain.$serviceLayer.$serviceName.$serviceContext.$serviceContextVersion.$operationName.$operationVersion.$paradigm
else
 $messagingLayer.$businessDomain.$serviceLayer.$serviceName.$serviceVersion.$operationName.$operationVersion.$paradigm
HeaderFields1 
CPAId2$cpaId
ConversationId2$conversationId
CorrelationId2$correlationId (if empty then skip this element)
MessageId2$messageId
ExternalRefToMessageId2$externalRefToMessageId (if empty then skip this element)
Timestamp2$timestamp
TransactionId2$transactionId (only used when $mode=reg and $cmhVersion=2; if empty then skip this element)
Service1 
Name2$serviceName
Context2$serviceContext
Action2 
Paradigm3$paradigm
Name3$operationName
Version3$operationVersion
Parameters:
namedefault
modecopied from mode
cmhVersioncopied from cmhVersion
namespace"http://nn.nl/XSD/Generic/MessageHeader/2" (only when $mode=reg and $cmhVersion=2)
"http://nn.nl/XSD/Generic/MessageHeader/1" (otherwise)
businessDomain 
serviceName 
serviceContext 
service(Context)Version1
operationName 
operationVersion1
paradigm 
applicationName 
applicationFunction 
messagingLayerESB
serviceLayer 
destinationif not empty this parameter contains the preceding parameters as described in 'Location' in the table above
fromIdproperty 'instance.name'
cpaIdif applicable, copied from the original (received) SOAP Header, else 'n/a'
conversationIdif applicable, copied from the original (received) SOAP Header, else parameter pattern '{hostname}_{uid}'
messageIdparameter pattern '{hostname}_{uid}'
correlationIdif $paradigm equals 'Response' then copied from MessageId in the original (received) SOAP Header
externalRefToMessageIdif applicable, copied from the original (received) SOAP Header
timestampparameter pattern '{now,date,yyyy-MM-dd'T'HH:mm:ss}'
transactionIdif applicable, copied from the original (received) SOAP Header

/xml/xsl/esb/bisSoapHeader.xsl:

elementlevelvalue
MessageHeader0 
  xmlns=$namespace
From1 
Id2$fromId
HeaderFields1 
ConversationId2$conversationId
MessageId2$messageId
ExternalRefToMessageId2$externalRefToMessageId (if empty then skip this element)
Timestamp2$timestamp
Parameters:
namedefault
namespace"http://www.ing.com/CSP/XSD/General/Message_2"
fromIdproperty 'instance.name'
conversationIdif applicable, copied from the original (received) SOAP Header, else parameter pattern '{hostname}_{uid}'
messageIdparameter pattern '{hostname}_{uid}'
externalRefToMessageIdif applicable, copied from MessageId in the original (received) SOAP Header
timestampparameter pattern '{now,date,yyyy-MM-dd'T'HH:mm:ss}'

/xml/xsl/esb/soapBody.xsl:

elementlevelvalue
[Payload]0if $errorCode is empty then the complete payload will be copied and if not already existing a Result tag will be added
else only the root tag will be copied
Result1this element will be the last child in the copied root tag (only applicable for $paradigm 'Response'); if $errorCode is empty and a Result tag already exists then skip this element including its child elements
  xmlns=$namespace
Status2if $errorCode is empty then 'OK'
else 'ERROR'
ErrorList2if $errorCode is empty then skip this element including its child elements
Error3 
Code4$errorCode
Reason4if $errorReason is not empty then $errorReason
else it will be derived from $errorCode:
errorCodeerrorText
ERR6002Service Interface Request Time Out
ERR6003Invalid Request Message
ERR6004Invalid Backend system response
ERR6005Backend system failure response
ERR6999Unspecified Errors
Service4 
Name5$serviceName
Context5$serviceContext
Action5 
Paradigm6$paradigm
Name6$operationName
Version6$operationVersion
DetailList4if $errorDetailCode is empty then skip this element including its child elements
Detail5 
Code6$errorDetailCode
Text6$errorDetailText (if empty then skip this element)
Parameters:
namedefault
modecopied from mode
cmhVersioncopied from cmhVersion
namespace"http://nn.nl/XSD/Generic/MessageHeader/2" (only when $mode=reg and $cmhVersion=2)
"http://nn.nl/XSD/Generic/MessageHeader/1" (otherwise)
errorCode 
errorReason 
errorDetailCode 
errorDetailText 
serviceName 
serviceContext 
operationName 
operationVersion1
paradigm 
fixResultNamespacefalse

/xml/xsl/esb/bisSoapBody.xsl:

elementlevelvalue
[Payload]0if $errorCode is empty then the complete payload will be copied and if not already existing a Result tag will be added
else only the root tag will be copied
Result1this element will be the last child in the copied root tag (only applicable for $paradigm 'Response' and 'Reply'); if $errorCode is empty and a Result tag already exists then skip this element including its child elements
  xmlns=$namespace
Status2if $errorCode is empty then 'OK'
else 'ERROR'
ErrorList2if $errorCode is empty then skip this element including its child elements
Error3 
Code4$errorCode
Reason4if $errorReason is not empty then $errorReason
else it will be derived from $errorCode:
errorCodeerrorText
ERR6002Service Interface Request Time Out
ERR6003Invalid Request Message
ERR6004Invalid Backend system response
ERR6005Backend system failure response
ERR6999Unspecified Errors
Service4 
Name5$serviceName
Context5$serviceContext
Action5 
Name6$operationName
Version6$operationVersion
DetailList4if $errorDetailCode is empty then skip this element including its child elements
Detail5 
Code6$errorDetailCode
Text6$errorDetailText (if empty then skip this element)
Parameters:
namedefault
namespace"http://www.ing.com/CSP/XSD/General/Message_2"
errorCode 
errorReason 
errorDetailCode 
errorDetailText 
serviceName 
serviceContext 
operationName 
operationVersion1
paradigm 

Author:
Peter Leeuwenburgh
  • Field Details

  • Constructor Details

    • EsbSoapWrapperPipe

      public EsbSoapWrapperPipe()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      Description copied from class: FixedForwardPipe
      Checks for correct configuration of forward.
      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class SoapWrapperPipe
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • getOutputNamespaceBaseUri

      public static String getOutputNamespaceBaseUri()
    • getBusinessDomain

      public String getBusinessDomain()
    • getServiceName

      public String getServiceName()
    • getServiceContext

      public String getServiceContext()
    • getServiceContextVersion

      public String getServiceContextVersion()
    • getOperationName

      public String getOperationName()
    • getOperationVersion

      public String getOperationVersion()
    • getDestination

      public String getDestination()
    • getMessagingLayer

      public String getMessagingLayer()
    • getServiceLayer

      public String getServiceLayer()
    • getParadigm

      public String getParadigm()
    • getApplicationName

      public String getApplicationName()
    • getApplicationFunction

      public String getApplicationFunction()
    • isValidNamespace

      public static boolean isValidNamespace(String namespace)
    • retrievePhysicalDestinationFromSender

      public boolean retrievePhysicalDestinationFromSender(ISender sender)
    • retrievePhysicalDestinationFromListener

      public boolean retrievePhysicalDestinationFromListener(IListener<?> listener) throws JmsException
      Throws:
      JmsException
    • isEsbDestinationWithoutServiceContext

      public static boolean isEsbDestinationWithoutServiceContext(String destination)
    • isEsbNamespaceWithoutServiceContext

      public static boolean isEsbNamespaceWithoutServiceContext(String namespace)
    • setMode

      public void setMode(EsbSoapWrapperPipe.Mode mode)
      Default value
      REG
    • setCmhVersion

      public void setCmhVersion(int i)
      Only used when mode=reg! Sets the Common Message Header version. 1 or 2
      Default value
      1
    • setAddOutputNamespace

      public void setAddOutputNamespace(boolean b)
      (only used when direction=wrap) when true, outputNamespace is automatically set using the parameters (if $messagingLayer='P2P' then 'http://nn.nl/XSD/$businessDomain/$applicationName/$applicationFunction' else is serviceContext is not empty 'http://nn.nl/XSD/$businessDomain/$serviceName/$serviceContext/$serviceContextVersion/$operationName/$operationVersion' else 'http://nn.nl/XSD/$businessDomain/$serviceName/$serviceVersion/$operationName/$operationVersion')
      Default value
      false
    • setRetrievePhysicalDestination

      public void setRetrievePhysicalDestination(boolean b)
      (only used when direction=wrap) when true, the physical destination is retrieved from the queue instead of using the parameter destination
      Default value
      true
    • setUseFixedValues

      public void setUseFixedValues(boolean b)
      If true, the fields CorrelationId, MessageId and Timestamp will have a fixed value (for testing purposes only)
      Default value
      false
    • setFixResultNamespace

      public void setFixResultNamespace(boolean b)
      (only used when direction=wrap) when true and the Result tag already exists, the namespace is changed
      Default value
      false
    • setP2pAlias

      public void setP2pAlias(String p2pAlias)
      When the messagingLayer part of the destination has this value interpret it as P2P
    • setEsbAlias

      public void setEsbAlias(String esbAlias)
      When the messagingLayer part of the destination has this value interpret it as ESB
    • validateListenerDestinations

      public void validateListenerDestinations(PipeLine pipeLine) throws ConfigurationException
      Specified by:
      validateListenerDestinations in interface DestinationValidator
      Throws:
      ConfigurationException
    • validateSenderDestination

      public void validateSenderDestination(ISender sender) throws ConfigurationException
      Specified by:
      validateSenderDestination in interface DestinationValidator
      Throws:
      ConfigurationException