How to persist custom data in SAP PI java table – Part 3
In this part we will test the service in SAP PI.
STEP 8: Test the webservice in WSNavigator
Open wsnavigator in SAP PI and select Provider System in search type and search for the webservice
Select the interface and click next and you should be able to see all the methods we created in the session bean
Let’s test add ticket method. Select AddTicket method and click next. Provide all the input values and click next. If the insert is successful we should get the ticket number back as response
Let’s read all the rows in the table and see if the row is actually inserted in the table
Web service clients:
a) PI mapping: Since the web service is available in SAP PI, We can perform SOAP lookup in mapping step to perform any operation on the table.
b) Adapter Module: Since we have local interface deployed along with the session bean, we can use dependency injection in the adapter modules(local enterprise bean only) with @EJB annotation(on EJB 3.0).
c) Remote clients: Remote clients need to perform JNDI look up to SAP PI(Not covered in this blog).
Note: 1) Special thanks to my friend and colleague N.Prasanna (SAP UI5 Consultant) for helping me 🙂
2) Developer should take care of table maintenance and that table entries do not overflow.
3) If the data that needs to be store is small and frequently used then it is better to store the data in value mapping in SAP PI instead of storing the data in database.
Any suggestions or feedback use the comment section below.