File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes JDOM Not Being Returned Properly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JDOM Not Being Returned Properly" Watch "JDOM Not Being Returned Properly" New topic

JDOM Not Being Returned Properly

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1130

I posted a message on the web service forum a couple days ago about an issue I'm having with a Web service. Since nobody has replied to it, I'm wondering if it's more of a JDOM problem.

So that I don't "double-post" here, the basic problem is that I'm returning a JDOM document from a web service, but in the client I'm only seeing the root element, not the Children. It all looks fine on the server so I'm thinking that rather than trying to return a "Document" (which the JAX-WS client seems to have wrong anyway), I should return something like a ByteArrayOutputStream or even, gulp, a String representation of the JDOM Document.

Any suggestions would be welcome.


William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Actually, returning a valid XML document in text format is the most universal way of communicating XML.

This has the great advantage that you can easily inspect the entire document.

Trying to return a serialized Java object sounds like a recipe for incompatibility.

I agree. Here's the link:
subject: JDOM Not Being Returned Properly
It's not a secret anymore!