cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Post in HTTP adapter

Former Member
0 Kudos

Hi,

We are developing one interface in which sender Torex system sends message in "HTTP Post" format.

In this sender application wants the url in following format.

http://server:port/sap/xi/adapter_plain?service=<xxx>&namespace=<xxx>&interface=<xxx>&sap-user=<xxx>...

In above "HTTP Post" format data has been sent in url without body of message.

I know the option in below blog.

https://weblogs.sdn.sap.com/pub/wlg/13639

But is there any other solution for this?

xml payload for above message is as below.

<?xml version="1.0" encoding="UTF-8"?>

<ns0:interface xmlns:ns0="namespace">

<ProductID>000000000000000216</ProductID>

<UID/>

<DeviceID/>

<StoreID>0004</StoreID>

</ns0:ExternalStockLocator_Retail_REQ>

Thanks

Edited by: darshana-PI on Feb 10, 2012 9:37 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

http://server:port/sap/xi/adapter_plain?service=<xxx>&namespace=<xxx>&interface=<xxx>&sap-user=<xxx>...

In above "HTTP Post" format data has been sent in url without body of message.

Please remember that when creating a sender/receiver using the Plain HTTP Adapter, the following are automatically filled out

Transport Protocol: HTTP 1.0, Message Protocol: XI Payload in HTTP Body. The transport protocol means that only HTTP 1.0 is supported and that for it to work, an HTTP Body is required.

Hope this helps,

Mark

baskar_gopalakrishnan2
Active Contributor
0 Kudos

No need ...

Edited by: Baskar Gopal on Feb 10, 2012 4:30 PM

former_member184681
Active Contributor
0 Kudos

Hi,

The blog you have mentioned shows how you can extend the functionality of SAP standard HTTP adapter. But you can use sender HTTP the standard way, just like you use any other adapter: configure the Data & Message Types, Service Interface, mapping and so on, just like you do normally.

Read about Sender HTTP Adapter here if required:

http://help.sap.com/saphelp_nwpi71/helpdata/en/43/64db4daf9f30b4e10000000a11466f/content.htm

By the way - make sure your XML structure is correct, because your open and close tags do not match:

<ns0:interface>

...

</ns0:ExternalStockLocator_Retail_REQ>

Hope this helps,

Greg

Former Member
0 Kudos

Hi Greg,

The requirement in this case in such a way that we cant use HTTP adapter in normal way.

Because sender system sending message data in URL without HTTP body. So thats we are using solution in attached blogs.

And that xml was just typo mistake.

Please advise if you have any solution to send HTTP request without body. In this data will come in url only.

Thanks.

Former Member
0 Kudos

Dear Darshan

There is an option to chek this.

Create the normal DT,MT.SI and Mapping. Complete the configurations without any sender Http Adapter and Sender agreeement.

Now post the payload using the HTTP Client from your system to PI susyem.

Let me know if this works.

Sourabh

former_member184681
Active Contributor
0 Kudos

Hi,

I think I got that now. You only have the incoming data in the HTTP URL, don't you? If so, then it is HTTP Get, not HTTP Post. And PI does not support it natively. What you can try to do is to use some UDF to get the HTTP URL during message mapping, extract the parameter values from it, and map them to the target fields. Looks quite complex, but I'm afraid there are no alternatives if you have to use HTTP Get.

Hope this helps,

Greg