Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

XI HTTP headers

Hi,

I'm using XI to request a non-xml third party webservice. This webservice requires a normal https POST with a parameter called "p". This allows for a simple form on a browser to be able to use it.

When the request is done by a regular browser like Firefox, everything goes ok and I get a normal response from the webservice. But when XI does the request with that same POST data, the server drops me a 500 Internal Server Error.

Using a local script to act as a server and give me what was sent by both Firefox and XI, I can see the POST data is correct, so as the Content-Length header. But the rest of the headers are quite different.

This is the request sent by XI:

===========================

POST / HTTP/1.0

content-type: application/x-www-urlform-encoded; charset=UTF-8

content-length: 59

connection: close

accept: /

user-agent: SAP Web Application Server (1.0;700)

host: 10.16.6.86:8080

sap-language: P

p=0302697012345678+++++++FR50CRSM1++++++++00000268400513N

===========================

And this is the request sent by Mozilla Firefox

===========================

POST / HTTP/1.1

Host: 10.16.6.86:8080

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5

Accept-Language: pt-br,pt;q=0.8,en-us;q=0.5,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Content-Type: application/x-www-form-urlencoded

Content-Length: 59

p=0302697012345678+++++++FR50CRSM1++++++++00000268400513N

===========================

My question here is: Is there a way to change the headers sent by XI and their content, so I could find out which one is making the webservice go boo on me? Or perhaps something else to try?

I've already tried the plain HTTP adapter and SOAP adapter without xml. In the above, the used was the plain HTTP adapter.

Thanks,

Coe

Former Member replied

Instead of using HTTP Plain adapter, SOAP adapter or even build your own HTTP Adapter, use XI adapter and a Java Proxy to do the HTTPS POST using the Socket or HttpsURLConnection java classes.

Check this out:

/people/prasad.ulagappan2/blog/2005/06/27/asynchronous-inbound-java-proxy

/people/thorsten.nordholmsbirk/blog/2006/08/06/use-a-java-proxy-instead-of-a-jca-adapter

Regards,

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question