I am trying to a pass an xml file to a web server with http POST. Could someone provide me an example of this please. Below is what I have got so far. It connects to the webserver, but does not issue the correct POST informaton.
What kind of error does the server give you? Any useful messages?
I'm looking at some of our code that does the same thing. We set a few other properties such as accept=text/xml, Content-Type=text/xml and Content-length. We write right to the stream with no StreamWriter and we flush() but don't close() until after we've read the response. Let me know if any of those differences seem important to you.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Nov 07, 2005
Thanks for the reply. I figured it out myself. I need to use "setRequestProperty" to override the standard MIME headers.