views:

43

answers:

3

What is the best way to send XML data to web services jax-ws?

One of the way I could make out is to convert xml into String from client side and send it as a String to WebService.

I don't think this is the best way / best practice .

A: 

I use the serialized Java objects directly.

Shervin
What about using XStream to serialize it and then instead writting it to file add it to StringBuffer then send .
NewBeee_Java
And why would you want to do that?
Shervin
It should be XML doc that going to be uploaded.
NewBeee_Java
When you serialize objects, JAXB will create the correct wsdl file for you. The data is transfered as XML, so its the same thing.
Shervin