Hope you don't mind, but I'm copying your response into this forum -- makes it easier to read the thread beginning to end. If you would rather I delete this, just let me know, and I'll remove it. Here is David's workaround:
I'm shocked, you're quite right. I have no idea where the behaviour comes from. I also tried "Soap-Action" just to see what happens, and it too gets converted. |
The work around I'm using is to open a socket connection and write the header myslef, but it means you now miss out on the automatic parsing of the response header. Annoying. I'm really looking forward to rewriting that when I shouldn't have to.
Just for the record:
Split the URL into the host and URI, use the Connector to open HOST:port, cast the Connection to StreamConnection (Not HttpConnection)
write the header like this: (i save it as a byte array then send as two chucks)
bos = new ByteArrayOutputStream();
out = new OutputStreamWriter(bos, "UTF-8");
out.write( URI );
* Don't forget the request length
* Don't forget the extra \r\n at the end
* Note the URI in the POST part.
Then send the header followed by the payload.
OutputStream os = conn.openOutputStream();
byte header = getHeader(requestData.length);
os.write(requestData, 0, requestData.length);
The easiest place to get this is to use the Apache SOAP TCP Tunnel GUI and copy the header data as-is. Drop another post and tell me how you got on. I'm using kSoap2.0 by the way.