Send xml code to server using java?
So, I'm curious. How would one go about sending XML, such as,
<request>
<playerID>Name</playerID>
</request>
to a server, using Java.
Is there a predefined method that exists within the Java API, or something of that sor开发者_Go百科t? Does sending the above code directly differ from sending it inside of an external XML document?
I'm at a loss. I really hope this question is clear enough!
So, I'm curious. How would one go about sending XML
Unless your bottleneck really is your bandwidth, I suggest you just send it as plain text similar to ordinary HTTP.
Is there a predefined method that exists within the Java API, or something of that sort?
Not in the standard Java API.
Does sending the above code directly differ from sending it inside of an external XML document?
Not sure what you mean here. Care to clarify?
You are talking about SOAP
You can do it with JAX-WS simply, Here is tutorial
精彩评论