on 01-31-2008 7:23 PM
Hi,
I've looked in various threads and wonder whether XI can actually do this.....
I want to send a plain text stream (actually multipart HTTP request message) to a remote server. No XML tags. Text would be something like this:-
BOUNDARY
Content-type: xxxxxx.......
Content-length: nnnn
xxxxxxxx..........data body........xxxxxx
BOUNDARY
I have the feeling that anything I do using the XI HTTP adapter will have the message wrapped in XML tags.
Can it be done or should I look elsewhere / write a program?
Many Thanks, Andy Tinsley
Hi Andy !!
Maybe you will need to develop your own Java Proxy Server, that is, define the interface message for the inbound message (the one that goes from XI to outside) and use the generate java proxy option to have the template for your development. There you should implement the method that received the message as parameter and use your own code the access the HTTP destination and do the post.
Another idea could be to use the StrictXml2PlainBean adapter module to convert XML to Plain text inside the adapter.
http://help.sap.com/saphelp_nw04/helpdata/en/82/f4993c03e0cd37e10000000a11405a/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/44/748d595dab6fb5e10000000a155369/frameset.htm
Regards,
Matias.
ps: please award points if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My problem does seem to be Unicode related. If I use an ABAP to read the data in Binary mode, create the Body of the request in binary mode and then Send it (HTTP Post) things work!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sadly the XI HTTP Adapter does not have a 'modules' tab (it is greyed out). This is different from the File Adapter which does allow modules. I think this is correct.
Meanwhile, I have also been trying to code using an ABAP and the IF_HTTP_CLIENT/REQUEST/RESPONSE objects. This has been quite successful, but I can't see how to switch off some of the automatically added header items i.e. 'user-agent' and 'sap-language'. There is the 'DELETE_HEADER_FIELDS' method, but you can't delete what isn't set up (some of these fields appear to be setup during the actual execution of the SEND method itself).
POST http://www.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1
Content-Type: multipart/mixed; boundary=ejjeeffe0
Content-Length: 1075
user-agent: SAP Web Application Server (1.0;700)
host: www.xxxxxxxx.com
sap-language: E
Also, it would be nice to understand where the 'ejjeeffe0' value for the Boundary is generated, as I would like to overide it.
Any ideas?
Regards, Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matias,
Thanks, but being an ABAP rather than a JAVA guy, I'd prefer an ABAP solution. I had not noticed the bit of text in the Help "However, using the plain HTTP adapter you can also send and receive data in HTML and ASCII. In this case you must use a Java mapping". I wonder if an ABAP mapping can help or whether I should try using a free-standing ABAP and try to call an HTTP function module (like is mentioned in another SDN thread). Ideally, I'd just like to use proper XI - if only it was possible.
I wonder what other possibilities there might be?
Regards, Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andy !
I think that you can use the StrictXml2PlainBean adapter module in the "Module" tab of the HTTP receiver adapter in the communication channel.
Check the reference help:
http://help.sap.com/saphelp_nw04s/helpdata/en/44/748d595dab6fb5e10000000a155369/content.htm
and also this blog as a reference, for the part of the StrictXML2PlainBean usage.
/people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework
This approach does not need any java development.
Regards,
Matias.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.