on 08-10-2005 10:18 AM
Hi,
Scenario: HTTP Sender <> XI <> HTTP receiver (Sync throughout; no BPM)
In this scenario, a HTTP channel is configured to the target URL to post data.
The message mapping results in a XML. HTTP posts the same XML to the target URL.
However,the target URL expects data Posted as name-value pairs.
eg. eid=45678&zip=11011&ename=Tom%20Lee
How can we configure HTTP adapter channel to post XML data as
name-value pairs (as in standard HTTP Form Post)?
Any pointers?
thanx,
Pops
Hi Pops,
I am also looking for the same kind of solution to the above requirement. Kindly provide way to achieve the requirement using Java Mapping as you have said in this post. I wish to try out the Java Mapping method first for this.
Regards,
S.Santhosh Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pops,
Did you find any other way for configuring the HTTP Adapter channel for posting name-value pairs without using the Java Mapping program? I am in the same situation and I wanted to make sure if there are any other solutions, before I create the Java Mapping program for doing that.
Thanks,
Hashim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
<b><u>Note</u></b>:
In my solution mentioned above (Java mapping) note the following:
When the XML is converted into name-value pairs, the output string looks like:
eg., eid=45678&ename=Tom Lee&zip=11011
To encode the space in "Tom Lee", using URL escaping in HTTP channel is not a choice.
It doesnot solve the problem. It will encode the whole output including the '&' and '=' signs, which should not be encoded.
So, within the Java mapping itself, the names & values have to be URL-encoded and then added by '&' to form the output string. And it should look like:
eg. eid=45678&ename=Tom%20Lee&zip=11011
--- Pops
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What woudl be the configuration of HTTP receiver adaptor in this kind of situation. I added some strings to the Prologue section of the receiver adapter but does not seem to work.
http://help.sap.com/saphelp_erp2005/helpdata/en/44/79973cc73af456e10000000a114084/content.htm
I just need to ge the XML body in cmxl = {whole xml body}
does not work..any help would be highly appreciated
Hi Udo,
I currently have a solution (simpler than having a BP), but do not expect it to be the right way of doing.
I am using Java Mapping to convert the XML structure into Name-Value pair. So the output of Mapping is a string like how HTTP post is expected. So the interface mapping having multiple mappings - firstly, the original Message mapping, and then the Java mapping to do the conversion. So, with a small extension, the solution is still kept simple.
However, I thought the POST requirement to HTTP URLs would be a common requirement, and expected the HTTP adapter doing this conversion. So, I am still looking for a straight solution (without any custom extensions).
Any one else faced this situation?
Can't this be handled by HTTP Adapter?
-- Pops V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pops (funny name ),
just a idea:
Take a Busines Process, where u call a transform step. Inside the inteface mapping u call a abap mapping, where u implement interface cl_http_client. So u can use WAS functionality and send a request in the form u like.
HTTP (sync) <-> BP
BP: transform (syncABAP request <-> HTTP receiver)
I think, that will work. I already implemented all single steps. But, of course, it s complex and may be there is an easier way.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.