Before starting this document please refer the topic Working with PlainJ2SE Adapters which I posted earlier. This article gives an idea on how PlainJ2SE Adapters work with XI.
- Step 1: Steps in PI server
- Step 2: Configuring Plain J2SE File Adapter for both Sender and Receiver.
- Step 3: Test the Scenario.
Step1: Steps in PI (XI)
Create Data types, Message Types, Message Interfaces, Message Mapping and Interface Mappings in IR.
a) Create Data type:
b) Create Message type:
c) Create Message Interfaces for Outbound and Inbound Interfaces
d) Create Message Mapping:
e) Create Interface Mapping:
Now Save and activate all the objects in IR. Then to go to the Integration Directory and create a Configuration Scenario and also Create Business Services.
Steps in ID:
- Create a communication Channel for the Receiver Business Service. And No need of configuring Sender communication Channel
- No Sender Agreement
- Create Receiver Agreement
- Create Receiver Determination
- Create Interface Determination
a) Create a communication Channel for the Receiver Business Service
- Adapter: XI
- Type: Receiver
From the above screenshot Target Host will be the IP address of the Target system to which PI has to send. Service Number can be anything. Path also can be anything. But while configuring the PlainJ2SE file_receiver adapter, it’s better to give the path for XI.httpService as mentioned below.
XI.httpService=http://<TargetIPAddress>:<Service Number>/file/test
Authentication Data:
- Authentication Type: Use Logon Data for Non-SAP System
- User Name: sap (which is used to logon the PlainJ2SE Adapters)
- User Password: init
b) No Sender Agreement
c) Create Receiver Agreement
d) Create Receiver Determination
e) Create Interface Determination
Finally configured steps in ID with colored:
Step2: Configuring Plain J2SE File Adapter for both Sender and Receiver
a) First let’s Configure Sender Adapter: file_sender2is
Below mentioned Parameters are Mandatory while configuring a Sender PlainJ2SE Adapter.
classname=com.sap.aii.messaging.adapter.ModuleFile2XMB
version=30
##Here we are using a Simple Row Conversion
mode=FILE2XMBWITHROWCONVERSION
## Integration Engine address and document settings (example, see docu)
XI.TargetURL=<Integration Engine URL of XI to which PlainJ2SE Adapter need to connect>
XI.User=<XI UserId>
The user must have the authorizations of group SAP_XI_APPL_SERV_USER
On the Integration Server.
XI.Password=<Password>
XI.Client=<XI Client >
XI.Language=EN
#XI.SenderParty=<Sender Party>
XI.SenderService=<Sender Business Service>
XI.Interface=<Sender Message interface>
XI.InterfaceNamespace=<Namespace>
#XI.ReceiverParty=<Receiver Party>
XI.ReceiverService=<Receiver Business Service>
The below mentioned parameters have to mention according to our requirement. Here we are doing with row conversion.
After Configuring Adapter follow these steps click Store Configuration Data next click Restart and then click Reload.
If Adapter is working fine then it should be in Green status. Check View log if it shows Red.
b) Configure the Receiver Adapter: file_receiver
It’s better to give the path for XI.httpService as mentioned below.
XI.httpService=http://<TargetIPAddress>:<Service Number>/file/test
Note: TargetIPAddress and Service Number are the same details that we mentioned in Receiver XI Communication Channel. So that our XI Adapter will find the Target system depending upon these details.
After Configuring Adapter follow these steps click Store Configuration Data next click Restart and then click Reload. If Adapter is working fine then it should be in Green status. Check View log if it shows Red.
Step3: Test the Scenario
Place a file with name PlainJ2se.txt in Input folder After the poll interval of 30secs as we mentioned in sender file adapter it should be archived in Archive folder and should place the target file name PlainJ2se<add timestamp>.txt in Output directory.
Check in the View log of sender File plain J2SE after placing a file in Input folder.
The above screenshot shows the successful process done by the Sender adapter as it was picked the file from Input folder sent to Integration Engine and also archived to D:/Archive.
Now check the View log of Receiver File J2SE Adapter.
This screenshots shows that Receiver FileJ2SE was also processed successfully.
Check the Tcode: SXMB_MONI in PI System.
Kalyan Chakravarthy is a PI Consultant with Fujitsu Consulting India Ltd. Prior to this, he has worked with Syntel and Xansa.