Sending an XML using HTTP POST
Does anybody know anything about sending an XML file using HTTP POST?
I need to write a program that will do this. Havnt a clue about HTTP POST though. All I have to go on is an example HTTP POST used by an application to send an xml. To me it looks similar to SOAP, which I also know very little about.
I assume the information such as 'Content-length' and 'Content-type' do not go in the XML. Do I have to code them into my aplication or where do they go?
Any info would be greatly appreciated.
You want to POST XML content, or you want to upload a file?
POST is HTTP headers, blank line, XML (or other data) content
file upload is multipart POST request, which is a little different.
Try looking at Apache's HttpClient , I'm sure it can handle either. And of course you need something on the server to handle it.
Caveat: I'm very new to Java too...
I have seen similar things done with JSP using the standard HTTP form stuff with "post" method:
<form name="<%=queryFormName%>" action="<%=queryAction%>" method="POST">
However ask someone more experienced if this would work in this case!
AliBa at 2007-7-28 17:17:02 >

if you want to use plain HTML to post content, you use HTML form and input tags. But presumably, the OP was about doing POST programatically from an application.
Need to use it to send an XML doc to a server but dont have a clue about it. Cant find much on the internet.
I intend to post it to an XAMP server. I already have my XML but as I say I know nothing about HTTP POST.
No and sort of...
As far as I know, SOAP uses (or can use) HTTP POST.
SOAP is a higher level protocol. You can create your own protocol that uses HTTP POST if you want. (HTTP being a protocol of it's own built on top of TCP socket communication, of course.)
But POST is not, in and of itself, an alternative for SOAP.
SOAP is no more or less secure then anything else over HTTP... presumably one would use HTTPS with SOAP to make sure things are sent securely. But that's not the entire story of security...
You should get a book on SOAP.