In part-1 and part-2 of the blog we created a table in java stack, created and deployed entity and session bean in java server. Also we added HTTP authentication for the deployed service.

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

/wp-content/uploads/2016/01/8_a_869979.jpg

Select the interface and click next and you should be able to see all the methods we created in the session bean

/wp-content/uploads/2016/01/8_b_869980.jpg

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

/wp-content/uploads/2016/01/8_c_869987.jpg

Let’s read all the rows in the table and see if the row is actually inserted in the table

/wp-content/uploads/2016/01/8_d_869988.jpg

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.

To report this post you need to login first.

8 Comments

You must be Logged on to comment or reply to a post.

  1. Eng Swee Yeoh

    Nice blog series, Anand. Appreciate your effort in sharing this. Definitely good to know as the ABAP stack is being slowly “phased” out!

    Rgds

    Eng Swee

    (0) 
  2. Sergey Fedechkin

    Hi, Michal. Thanks for detailed explanation.

    Could you clarify, if using of JPA entity in PI 7.4 database is fully covered by SAP licensing? Is it any restrictions for custom JPA development in PI database?

    Thanks.

    Regards, Sergey.

    (0) 
        1. Anand V D Post author

          Hi Madan,

          The java dictionary table can be exported to an ear file. The ear can be attached to cts+ transport and moved to other environments.

          But, I am really not sure how to transport table entries from one environment to other. If I find any way to do this then I will update it here.

          Thanks,

          Anand

          (0) 

Leave a Reply