cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle an HTTP GET request from AzureAPI portal in SAP PO.

Robert_d_Hoedt
Explorer
0 Kudos
369

restsender-channel.pngrestsender-general.pngrestsender-operationdetermination.pngrestsender-restoperation.pngrestsender-restresources.png

Hi,

I have to create a synchronous scenario from AzureAPI portal <-> SAP PO75 <-> S4 on prem.

I can use REST adapter from AZURE to PO. I use a proxy interface from PO to S4.

The request from the API portal will be an HTTP GET and the aim is to get stocksupplies from S4, and send them back to the portal.

From what i heard from the API side i will receive an empty request (in S4 this request will lead to a collection of all relevant stocksupplies; we dont to differentiate with parameters in the request itself)

I am having some trouble to understand how to configure the REST adapter for this (empty) HTTP GET request.

And how will this request be transformed into an xml structure that i can use in the proxy as a request message.

I give the first 5 tabs for my Rest communication channel

Hopefully i can get some good advice for what is needed

Regards

Robert

Accepted Solutions (1)

Accepted Solutions (1)

Robert_d_Hoedt
Explorer
0 Kudos

restsender-soap-ui.png

By trial and error i found that my settings for the REST adapter were correct. After testing the same with SOAP UI (see picture)

When sending a "empty" GET request to the endpoint specified in the REST adapter, the adapter sends the message as specified in tab Operation Determination into PI and it gets processed to the backend proxy.

In my case i out one xml field in the MT stucture and in message mapping i put a constant in it. But i think if you just use an empty operation without any fields it would also process.

So for me this set-up works. Now there is still the reply message to be implemented but that seems much more straightforward.

Kr

Robert

Answers (1)

Answers (1)

fprokopiuk
Active Participant
0 Kudos

Hi Robert,

First thing that you need to do is turn off input message processing in General tab - you don't have payload here, all informations are kept in the URL so no need to set it up.

In your case you can probably simply call interface with dummy inbound and constant outbound. I found blog with similar problem here. Just ignore the ASMA part which you probably don't need.

Robert_d_Hoedt
Explorer

Hi Filip,

Thx for answering. But your suggestion does not work. If i turn inbound processing of i get an error in the adapter:

"....Returning to application. Exception: com.sap.aii.adapter.xi.routing.RoutingException: Unable to parse XML message payload to extract operation for receiver determinationorg.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file...."

So i turned that back on. I also managed to get a test working from SOAPUI. I found that with an empty GET to the REST adapter my operation was found and sent into PI, mapped and processed to the backend.

Pretty much the same way that is described in the blog you mention.

So i guess my setup works.

Kr

Robert

fprokopiuk
Active Participant
0 Kudos

Just FYI, for pure passthrough scenario you don't use operations, and to achieve it you need to use interface of type Stateless (XI 3.0-compatible).