2

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 sort? 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!

2 Answers 2

2

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?

Sign up to request clarification or add additional context in comments.

2 Comments

To clarify, I could send the XML as "Code in a string" or, as code in an external XML document.
Can't see how sending it in an external xml document would gain anything.
1

You are talking about SOAP

You can do it with JAX-WS simply, Here is tutorial

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.