Question

I have some data which I think would be best to be represented in XML. I want this data to be transmitted from a Java Web service to a web client so basically I want the XML data to be transmitted. What I'm thinking is reading from the XML file from the web service converting it to an object and sending it to the client and the client would convert it to xml again.

But I'm not sure if this is the best way I could do it... Any opinions please?

Thanks and regards, Krt_Malta

No correct solution

OTHER TIPS

I have to disagree. A web service should be auto descriptive. When someone points to the WSDL it is far better to have an object model than a single string property which will contain some proprietary XML. Also there will be e big overhead of serialization/deserialization. My recommendation would be to design an object model which will represent your data and expose this model in the web service. Manipulating objects is easier than manipulating XML.

If its already xml you shouldnt convert it to an object. Your server module should stream the xml file/data to teh client directly instead of going for the web service model.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top