开发者

Send xml code to server using java?

开发者 https://www.devze.com 2023-02-09 12:56 出处:网络
So, I\'m curious. How would one go about sending XML, such as, <request> <playerID>Name</playerID>

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

0

精彩评论

暂无评论...
验证码 换一张
取 消