cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

passing URL query string

Former Member
0 Likes
956

Hi,

I have an HTTP sender adapter scenario. Our client would like to send the business data through the URL query string

to our server. My question is how would the XML Data be passed on to the query string? and is XI capable of using the GET method instead of POST? Please see below sample URL. would you know what is the parameter for the XML Data in the query string? I tried almost everything but to no avail. (tried PayloadName, Payload, XMLPayloadName, XML..etc)

http://server:port/sap/xi/adapter_plain?service=WebURL_Sender&namespace=http%3A%2F%2Fsender%com%2Eph...;

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

<ns0:MT_EPayRet xmlns:ns0="http://sender.com.ph/1">

<AddCode>xxxx</AddCode>

<RefNum>xxxx</RefNum>

<TranAmt>xxxx</TranAmt>

<TranDate>03/03/2011</TranDate>

<TranTime>03:11</TranTime>

</ns0:MT_EPayRet>

I have tried searching thru the forums but I've found no answer. Appreciate the help guys.

View Entire Topic
stefan_grube
Active Contributor
0 Likes

> ... using the GET method instead of POST?

No, this is not possible.

Former Member
0 Likes

Thanks Stefan. I think that so too.

One more question I have though is when I am sending a test message in the runtime workbench to my sender http adapter. for some reason I am able to send to

http://server:port/sap/xi/engine?type=entry

but not to

http://server:port/sap/xi/adapter_plain?

Sending to the latter returns - Error while sending message: 415 Unsupported Media Type

Do you know why this is happening?

Shabarish_Nair
Active Contributor
0 Likes

you can use the HTTP client http://sappihttpclient.codeplex.com/ to test these scenarios

Former Member
0 Likes

Hi Shaba, Thanks for help. I already have this HTTP test client. My problem now is our client's website is only capable of passing URL query string to us.

Shaba, Stefan, guys, would you know a solution for this type of scenario?

Thank you so much in advance.

stefan_grube
Active Contributor
0 Likes

> I already have this HTTP test client. My problem now is our client's website is only capable of passing URL query string to us.

This is hard to believe. What kind of system is this?

You could create a serlte which redirects the incoming GET request to PI. This is easily done with some Java skills and NWDI.

This servlet can run on PI Java stack.

Former Member
0 Likes

Stefan, I agree. It is a payment system/site from a local bank.

by serlte I assume you mean service?

I am not familiar with creating services like these. Do you have references on how to create this service?

Former Member
0 Likes

In my opinion probably Stefan's suggestion is the best solution approach.

However, another idea is to create a WebDynpro application, or another WebAS application, and call it from your client's website, passing WebDynpro parameters in URL, and use the WD like a service, responding with response data.

Shabarish_Nair
Active Contributor
stefan_grube
Active Contributor
0 Likes

> i think he means a servlet to do a HTTP GET

Correct

baskar_gopalakrishnan2
Active Contributor
0 Likes

Create a simple web application project using NWDS and deploy in PI . Create a servlet which extends class GenericServlet enough. Use service or doGet method and code your logic. Use HttpSerlvetRequest parameter to read your request http header parameters. Search Google for simple http get methods coding.