WHINT Payload SaveAttachment

Functionality

This Adapter Module is adding the current payload as an attachment to the SOAP XI 3.0 message of SAP Process Orchestration/PI. It is useful, when the content is changed afterwards (e.g. via content conversion) or when the target system would like to see the message which was originally received (e.g. when the target system is an SAP ABAP Proxy runtime that supports multipart messages).


Prerequisites

  • Deploy the SCA/EAR file provided by Whitepaper InterfaceDesign using NWDS/JSPM/SUM/Telnet
  • Check if the deployment was successful in JNDI browser (NWA -> Troubleshooting -> Java -> JNDI Browser) It should appear under Folder WHINT with name PayloadSaveAttachment

Usage

  • Add the Adapter Module in the Module Processor (Sender or Receiver Channel)
  • Name: WHINT/PayloadSaveAttachment
  • Type: Local
  • Parameters:
    • FileName (optional): to set the file name of the attachment if needed

Example

Here, a File Adapter is converting a CSV file into XML and sending the data (both files, converted and unconverted) via Mail adapter to a receiver.

Channel Configuration:

PSA_Channel

Message Log:

PSA_LOG

Message Monitor:

PSA_Multipart

Message Editor:

E-Mail:

PSA_Mail

WHINT On-Premise Adapter Bundle

Version: 2015.08 released in November 2015

ICC_cert_pbnw    sap-store-lr

This SAP certified solution bundle consists of 3 components:

Please visit our product landing page!

Sync-Async Connectivity (SOAP 2 MAIL) with SAP PRO (w/out BPM)

Sync-Async Patterns with BPM on SAP NetWeaver Process Orchestration (PRO) are quite easy to implement.
However, when you want to design the integration flow as lean as possible, this document might be useful for you as the usage of the sync/async adapter modules is a bit tricky.


Scenario:

  • SOAP Sender (in our example WebShop) is calling SAP PRO synchronously
  • The request is forwarded asynchronously via E-Mail to the receiver (typically it would be e.g. IDoc to SAP ERP of course)

This is an example scenario of course. HTTP/SOAP on the (sync) sender side can be combined with any channel on receiver side (IDOC/SOAP/FILE/SFTP/MAIL/JMS/JDBC/…)


Adapter Modules used:

We are using the following (standard) adapter modules:

  • AF_Modules/RequestOnewayBean (to convert the synchronous message to an asynchronous one)
  • AF_Modules/DynamicConfigurationBean (to store the original message id in the ASMA of the sender channel and read it in the receiver channel to set the correlation)
  • AF_Modules/WaitResponseBean (to wait for the reply of the receiver channel)
  • AF_Modules/NotifyResponseBean (to send back the message to the waiting sender channel using correlation)

ESR Content (sender side):

  • Service Interface Sync Out
  • Service Interface Sync In (Dummy)
  • Operation Mapping (Service Interface Sync Out -> Sync In)
  • Message Mapping (Input Message Type -> Output Message Type)

DIR Configuration:

  • Sender System
    • SOAP Sender Channel
    • SOAP Receiver Channel
  • Receiver System
    • MAIL Receiver Channel

Screenshots:

It is of course not necessary to do this in NWDS but I really started to like it…

SA_Mapping

SA_SOAP_SND_1SAP_SOAP_SND_2

SA_SOAP_RCV_1 SA_SOAP_RCV_2

SA_ICO


Test & Monitoring:

  • Call WebService from WS Navigator
  • ASMA (DynamicConfiguration) with MessageId
  • E-Mail received from SAP PRO

SAP_WSNavi2

SAP_Moni1 SAP_Moni2 SAP_Moni3 SAP_Moni4

SAP_Mail

WHINT DynamicQueue Writer

Functionality

This Adapter Module is able to set the EOIO Queue/Sequence Id by putting it together from existing DC values or by accessing the XML payload using an XPATH.

Prerequisites

  • Deploy the SCA/EAR file provided by Whitepaper InterfaceDesign using NWDS/JSPM/SUM/Telnet
  • Check if the deployment was successful in JNDI browser (NWA -> Troubleshooting -> Java -> JNDI Browser) It should appear under Folder WHINT with name DynamicQueueWriter

Usage

  • Add the Adapter Module in the Module Processor (Sender or Receiver Channel)
  • Name: WHINT/DynamicQueueWriter
  • Type: Local
  • Parameters (Input):
    • in.varX = xpath({XPATH on XML payload}) or dc({Key of Dynamic Configuration: NAME NAMESPACE})
    • in.search.attachment = {true/false} (search also with xpath in attachment)
    • in.remove.specialchar = {true/false} (remove special characters)
  • Parameters (Output):
    • out.dq.name = {combination of in-Variables with constants/strings}
    • Please note that the maximum length of the queue must not exceed 16 characters
    • Substring-Values to build the queue name:
      • $var1.substring(startOffset,endOffset)
      • $var2.substring(startOffset)
      • $var1.substring-after(“TEXT“)
      • $var2.substring-before(“TEXT“)

Example

The Queue is built by concatenating the IDoc number with the file name (without “.xml”) separated by “_”:

  • in.var1: xpath(//EDI_DC40/DOCNUM)
  • in.var2: dc(FileName http://sap.com/xi/XI/System/File)
  • in.search.attachment: true
  • in.remove.specialchar: false
  • out.dq.name: $var1+_+$var2.substring-before(“.xml“)

WHINT DynamicConfiguration Writer

Functionality

This Adapter Module is able to set the value of a Dynamic Configuration (DC) value, also known as Adapter Specific Message Attribute (ASMA). You can build the name by putting it together from

  • existing DC values or
  • by accessing the XML payload using an XPATH or
  • constants

Prerequisites

  • Deploy the SCA/EAR file provided by Whitepaper InterfaceDesign using NWDS/JSPM/SUM/Telnet
  • Check if the deployment was successful in JNDI browser (NWA -> Troubleshooting -> Java -> JNDI Browser) It should appear under Folder WHINT with name DynamicConfigurationWriter

Usage

  • Add the Adapter Module in the Module Processor (Sender or Receiver Channel)
  • Name: WHINT/DynamicConfigurationWriter
  • Type: Local
  • Parameters (Input):
    • in.varX = xpath({XPATH on XML payload}) or dc({Key of Dynamic Configuration: NAME NAMESPACE})
    • in.search.attachment = {true/false} (search also with xpath in attachment)
  • Parameters (Output):
    • out.dcX.key = {Key of Dynamic Configuration: NAME / NAMESPACE}
    • out.dcX.name = {combination of in-Variables with constants/strings}
    • Substring-Values to build the target DC value (name)
      • $var1.substring(startOffset,endOffset)
      • $var2.substring(startOffset)
      • $var1.substring-after(“TEXT“)
      • $var2.substring-before(“TEXT“)

Example

The FileName is built by concatenating the IDoc number with IDoc message type separated by “_” and with a file type “.xml”:

  • in.var1: xpath(//EDI_DC40/DOCNUM)
  • in.var2: xpath(//EDI_DC40/MESTYP)
  • in.var9: dc(FileName http://sap.com/xi/XI/System/File)
  • out.dc1.key: FileName / http://sap.com/xi/XI/System/File
  • out.dc1.name: $var1+_+$var2+.xml

The screenshot example shows (as an iFlow channel configuration in NWDS) how the FileName is CHANGED by prefixing a constant “DEMO” with the content of XML element “DocumentTypeCode”.

WHINT DCW NWDS

WHINT Payload ReplaceString

Functionality

This Adapter Module is able to replace a string of any payload with another one. Binary objects are (of course) not supported, the payload must be text-based.

Prerequisites

  • Deploy the SCA/EAR file provided by Whitepaper InterfaceDesign using NWDS/JSPM/SUM/Telnet
  • Check if the deployment was successful in JNDI browser (NWA -> Troubleshooting -> Java -> JNDI Browser) It should appear under Folder WHINT with name PayloadReplaceString

Usage

  • Add the Adapter Module in the Module Processor (Sender or Receiver Channel)
  • Name: WHINT/PayloadReplaceString
  • Type: Local
  • Parameters:
    • separator = ;
    • param1 = oldValue;newValue
    • param2 = badString;emptyString
    • param3 = clearString;blankString
  • Variables:
    • emptyString = “”
    • blankString = ” “

The name of the param (except separator) is not important. You can use the parameters also in combination, the replace will be done as many times you enter a param.

Special characters have to be escaped with a backslash according to Java Regex Pattern Documentation.


Example:
A file with CRLF characters has to be corrected. In addition the string QTY is replaced by XXX.

PRS1

File before (25 lines):

PRS3

File after (only 1 line):

PRS4

Message monitor:

PRS2