Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

How to setup NWDS configuration for creating Customized Adapter Modules in PI 7.31 using NWDS 7.3 SP07

$
0
0

How to setup NWDS configuration for creating Customized Adapter Modules in PI 7.31 using NWDS 7.3 SP07

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Author: Vinay Puttaswamy

Prerequisites

 

·         Java and PI Knowledge

 

·         S/W Environment: PI 7.31(Single Stack),SAP NetWeaver Developer Studio 7.31 SP07, Java Version 1.6

 

Adapter Modules

 

Adapter Modules are required in PI in order to handle certain specific needs of a Business Scenario which normal adapters cannot handle by default. The functionality of these adapters can be enhanced by implementing the adapter module.

 

Required jar files

commons-net-2.0 jar

  1. com.sap.aii.af.ms.svc_api
  2. com.sap.aii.proxy.svc_api.jar
  3. com.sap.aii.sec.svc_api.jar
  4. com.sap.aii.utilxi.server.jar
  5. com.sap.aii.utilxi.core.jar
  6. com.sap.xi.mapping.tool.lib_api.jar
  7. sap.com~tc~bl~txmanagerimpl~plb~impl.jar
  8. sap.com~tc~je~appcontect_api~API.jar
  9. com.sap.aii.af.cpa.svc.api
  10. com.sap.aii.af.lib.mod
  11. com.sap.aii.af.ms.ifc_api
  12. com.sap.aii.af.svc_api
  13. com.sap.xpi.ib.mapping.lib

jakarta-oro-2.0.8

  1. sap.com~tc~logging~java~impl

 

Place these jars under a separate folder on your local desktop

Note: The above mentioned jars are just an example. Jar files needs to be added based on one’s requirement

 

 

How to set up a Build Path

• Go to Windows -> Preference

• Expand Java and select the class path variable to create a new entry. Assign a name to it (for example: Adapter Module Jars) and select   the directory which has the jar files.

 

pic1.jpg

 

 

Steps to create EAR and EJB projects

 

• Go to File -> New -> EJB Project. Click on EJB project and then on Next as shown below:

 

pic2.JPG

 

 

                   • Enter the Project Name as FileModule_EJB.

• Select Target Runtime as SAP Libraries.

• Select Configuration as Default Configuration for SAP Libraries.

·         EJB Module Version 3.0

• Select add project to an EAR and enter EAR project name as FileModule_EAR and then Click on Next as shown above:

pic3.JPG

 

Click on Next as shown above

 

pic4.JPG

 

·         Uncheck Create an EJB client JAR module to hold the client interfaces and classes and click on finish as shown above.

·         You can see the following EAR and EJB file created in NWDS

 

 

pic5.JPG

 

·         Scroll down under FileModule_EJB -> ejb Module

·         Create a package by name -> com.sap.pi.com

·         Create a class by name -> FileModule.java as shown below.

·         Here in this FileModule.java, you can write your own customized adapter module code.

 

 

 

pic6.JPG

 

·         Before building the code, we need to import jars. Please refer to the below steps for importing the jars.

- - - Right click on ReadFiles_EJB -> Build Path -> Configure Build Path

- Click on Add Variable and select Adapter Module Jars folder that you had created earlier and then click on Exten

-Select all the jars inside the class path folder and press ok.

 

Once the build is complete, proceed with the following steps

• Make sure that the application-j2ee-engine.xml file under the EAR project has the content exactly as in the attached txt file.

 

 

Note : Please refer to the attached application-j2ee-engine.xml file

 

 

pic7.JPG

·         Right click on the EJB project and select Export ->SAP EJB JAR file. Follow the wizard after that, select the location same as the actual EJB project folder so that way you can see the EJB jar file in NWDS itself

 

 

pic8.JPG

 

• Select the Destination and click on finish as shown below

pic9.JPG

 

·         Similarly Right click on the EAR project and select Export ->SAP EAR file. Follow the wizard after that, select the location same as the actual EAR project folder so that way you can see the EAR file in NWDS itself.

 

pic10.JPG

 

 

Select the Destination and click on finish as shown below

 

 

 

pic11.JPG

 

How to set Target Server for Deployment

   • Navigate to Windows -> Preferences

    • Select SAP AS JAVA

    • PI server information needs to be entered here and once done please click on Register SAP instance in order to register the server for deployment

 

 

Deploying the EAR file in Target server

·         Go to FileModule_EAR file as shown below. Right click and select Run As ->Run on Server

 

 

pic12.JPG

 

pic13.JPG

 

 

·         Click on Finish and the EAR module will be deployed on the corresponding PI Server with the status as Deploy Finished Successfully as shown below

 

pic14.JPG

Following screen will show the deploy logs as well

 

pic15.JPG

 

 

Regards

Vinay

 


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>