cancel
Showing results for 
Search instead for 
Did you mean: 

Calling HTTP URL and sending data in URL

Former Member
0 Kudos

Dear All,

We have a requirement, where a customer is asking us to send the payload data as a part of the URL.

He has given us a URL and one parameter in URL is 'xmldata' and value of this parameter has to be the payload.

like

http:
abc.com?xmldata=<?xml version="1.0" encoding="UTF-8" ?><vehicle><ConsignmentData><consigner>1143</consigner></vehicle></ConsignmentData>

Please suggest how this can be achived. I think it may be possible by using ASMA, but i don't know the exact way.

Please help

with regard,

Ravi Siddam

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

This is not answered, but i have close my open threads for opening new.

aashish_sinha
Active Contributor
0 Kudos

Hi,

As suggested, you can use Plain HTTP adapter for posting your XML String to webpage directly. In Receiver HTTP Communication channel you can give the parameters and URL where data is going to post.

Please have a look into these links to understand better.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/bd/ec25443b19f848aa46e81487ec56ff/frameset.htm

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/44/79973cc73af456e10000000a114084/frameset.htm

Regards

Aashish Sinha

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Ravi,

Under the PLAIN_HTTP Adapter, you could use URL Address if you are not using SSL. In case you are using SSL, you need to use HTTP Destination by creating RFC Destinations in SM59

As for the parameters:

set Content Type to text/plain

set Prolog to xmldata=

for more information, kindly refer to this thread

hope this helps

Former Member
0 Kudos

Hi Mark,

We have done the changes suggested by you, but still when we are getting the value as 'null' for the parameter 'xmldata'.

We are using following code in Java servlet

String datafrompara = req.getParameter("xmldata");

System.out.println("data from parameter" + datafrompara);

Though when we read the buffer of the from request, we see that xmldata= is added to the payload.

Our purpose is to get the payload from the parameter.

Please help

with regards,

Ravi Siddam