XI HTTP headers
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
user-agent: SAP Web Application Server (1.0;700)
And this is the request sent by Mozilla Firefox
POST / HTTP/1.1
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:126.96.36.199) Gecko/20070725 Firefox/188.8.131.52
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.
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: