Skip to Content
avatar image
Former Member

Restful Service

Hi All,

Below is the interface design steps to be done in PI. Kindly suggest best flow to implement the scenario and the adapter to be used to connect to restservice.

SAP <-> PI <-> RestService

Below are the Mutliple calls to be done in SAP PI 7.3.

  1. SAP/PI requests HTTP POST to http://xxxxx/services/rest/org/venue  
  2. Above Service returns a URL as response like this  http://xxxxxxx/services/rest/org/venue/101497  
  3. SAP/PI requests HTTP GET to the above service (Step 2)
  4. SAP/PI receives back the Response XML of Venue Details.

Response to first step will be as

response_line : HTTP/1.1 201 Created

server_protocol : HTTP/1.1

status_code : 201

status_reason : Created

server : Apache-Coyote/1.1

location : http://xxxxxx/services/rest/org/venue/175150

content-type : application/xml

content-length : 0

date : Fri, 04 Jan 2013 16:58:42 GMT

connection : close

Regards,

Sabitha

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jan 22, 2013 at 10:57 AM
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      As the dynamic URL configuration is not supporting for HTTP GET method of restservice in PI 7.31.

      We are planning to design using JAVAProxy.

  • Feb 01, 2013 at 04:06 AM

    Hello Sabitha,

    Below are the Mutliple calls to be done in SAP PI 7.3.

    1. SAP/PI requests HTTP POST to http://xxxxx/services/rest/org/venue  
    2. Above Service returns a URL as response like this  http://xxxxxxx/services/rest/org/venue/101497  
    3. SAP/PI requests HTTP GET to the above service (Step 2)
    4. SAP/PI receives back the Response XML of Venue Details.

    You actually have two options:

    1. Use two separate synchronous scenarios for the HTTP Post and HTTP Get e.g execute the Post and then if you get a response, then use trigger the HTTP Get.

    2. Use just one scenario, you would need to use a Java User-Defined Function to work. For preference, I would choose to use the HTTP Post for the UDF.

    Question: Can the HTTP Adapter of 7.3 handle an empty HTTP Body response for the HTTP Post method?

    Hope this helps,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 05, 2013 at 10:18 AM

    Hi Sabitha,

    The KaTe RESTful adapter for PI / slideshare can handle such scenarios (support for resource links, etc)

    With best regards

                      Sebastian

    Add comment
    10|10000 characters needed characters exceeded