COMPLETE REST CONFIGURATION
RESTful Services are lightweight, scalable and robust services which can be used for even mobile based communication.
REST stands for Representational State Transfer, primarily used to transfer data on the web. Web services that are build using REST are called as RESTful Services. How ever, the most commonly used webservices in PI are over the SOAP protocol using standard structure and methods. Due to its strict restriction on the protocol, SOAP based webservices is considered not so robust.
Both SOAP and RESTful Services uses HTTP as underlying transport medium but I find RESTful services will outpace the SOAP calls in near future due its simple to develop and use features.
JSON is a simple data structure which is used to transfer the message over RESTful services.
In this scenario, we will try to consume a JSON based RESTful services from the web and perform GET operation to retrieve the data from the service.
This blog shows the scenario to call RESTful services from SAP PI Advantco REST adapter. This is HTTP-to-REST step by step scenario.
Let’s try to read this message from SAP PI Advantco REST Adapter.
Let’s look at the steps.
Create the Data Type, Message Type:
Create two Interface Outbound and Inbound Sync Interface:
List of all ID Objects Snapshot:
Sender HTTP Channel:
Receiver REST Channel:
Rest of the Configuration Snapshot:
Triggering the HTTP Message to Interface:
I used SOAPUI tool to trigger the HTTP message to the interface. If you are not aware of this tool then it is tool used to call any webservices / HTTP messages. Pretty handy tool to track the trace and debug the issues.
URL used to trigger to our Interface: http://host:port/XISOAPAdapter/MessageServlet?channel=:BS_SRINI_REST:CC_SRINI_REST_SENDER&j_username=wsuser&j_password=1n1t&nosoap=true
Message processed in SXMB_MONI:
There will challenges during connecting the PI system to this RESTful service. To resolve the connectivity issue, you might need to open the website IP in the firewall to allow PI receiver REST channel to connect to this services.
Also, no authentication is required to pull the message from the RESTful service which is useful to test the features.
Let me know if you have any questions / clarifications from here.