Skip to Content
Author's profile photo Former Member

SAP PI/PO REST Sender Adapter configuration for Web Proxy/oData services

Many of you are aware that SAP PI/PO REST Adapter is out in the market for quite sometime, but so many unanswered questions for those who are very new to the SAP Technology or REST/UI5 architecture, the take away from this blog would be

Purpose of REST Adapter.

How to configure REST Sender Adapter in SAP PI/PO (7.31 SP14 / 7.4 SP09)

How to consume the ECC ABAP Web service Proxy and read oData services which are build in ECC.

What are the testing Tools available in the market to test the REST/oData Services.

The reason small SAP customers prefer REST is because if they want to upgrade their old front end applications (Java/.net/Web dynpro Java) with UI5, fast rendering and easy designing front end tool then they can this route configuring the REST Sender Adapter on SAP PI/PO since UI5 reads JSON, rest can convert from JSON to XML and back to JSON and can consume the web proxy in ECC through SOAP adapter.

Application –> REST Adaptor (PI/PO)–> SOAP adapter –> SAP ECC Web Proxy.

SAP recommendation is to use oData and REST because SAP did not released oData Sender Adapter yet. But as said above, some of the small customers don’t want to spend time/money to convert existing ECC web services to oData services but still they want to use UI5 to consume ECC Proxies, in that scenario this is the best approach and robust and salable because once they have the budget approved in near future, they can easily unplug web services and plug in oData services.


Here are steps to consume the web services. iflow connector/ NWDS is not required to configure and use REST adapter.


Step1:


All the logic resides on SAP PI/PO ESR objects, focus on that mapping and service interface, it can be achieved easily.


Go to DataType –> download .xsd files for req/res. Create the External Definition req/res with that .xsd files.

Create the MM for same req/res for external definition, and have 1:1 mapping drag from the target to source.

Create OM use MM req for Mapping Program. Save and activate. Please note we are not touching/changing any existing OM/MM/SI.


Here comes the actual REST Sender Adapter configuration in SAP PI/PO ID object. Rest config 1.JPG

Rest config 2.JPG

REST config 3.JPG

REST config 4.JPG

REST config 5.JPG

REST config 6.JPG

REST config 7.JPG

screen shots 4 and 5 are very important because of the end point URL and custom pattern, they are used to call your service During Testing.


You can download the REST client add on to Firefox and test/ Google Postman/ with any SOAPUI REST



Testing REST.JPG

SoapUI REST.JPG

Good Luck….

questions/comments/likes are more welcome  🙂








Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Niranjan,

      Thanks for providing detailed configuration.

      I have same scenario like REST<>PO<>Proxy, I have followed same steps and configure the same. If we test the scenario it's working only one time,  again if we test same endpoint its giving as below error. Could you please help me out from this issue.

      <html><head><title>Error</title></head>
      <body><h1>Error</h1><pre>
      Error while sending message to module processor: senderChannel 'aefbee106a293e05a3b243e41f8a4425': Catching exception calling messaging system: com.sap.aii.af.sdk.xi.srt.BubbleException: HTTP Response Received. Status Code = 500 [null "null"]
      </pre></body></html>

       

      Author's profile photo Former Member
      Former Member

      HI Niranjan,

      In my scenario i have REST <-> PI <-> JDBC. For the sender external definition from where do i get the XSD for message type and service interface.

      Can i create my own DT & MT and use it in my interface and then how will the REST client send the data in my format?

      Thanks

      Husain

      Author's profile photo Ankit Mishra
      Ankit Mishra

      Hi Niranjan,

      If I try REST Client in Chrome it gives me a JDBC error as my receiver in a HANA system. But if I test the same using SOAP UI Rest service I get an error "No channel found to handle "POST" request to "/ABC/XYZ" I've used the same config as yours. My end point looks like "http://host:port/RESTAdapter/ABC/XYZ/"

      Any idea on this issue?