GeeCON Prague 2014*
The moose likes XML and Related Technologies and the fly likes XML doument to a string 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 "XML doument to a string" Watch "XML doument to a string" New topic
Author

XML doument to a string

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

I have written this function to covert XML document to a string, but it does not work with JWS (works well in a standalone application as well as servlet) hence I was wondering if there's another approach to convert XML document to a String -

TIA,
- Manish
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
What do you mean by "does not work"? Does it throw an exception or is the output different from what you expected?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

It throws this exception -
Can not convert XML document to String
org.apache.xml.utils.WrappedRuntimeException: Output method is xml could not
load output_xml.properties (check CLASSPATH)
I suspect this is due to the fact that a JWS application cannot read properties. However, I do not know what could be a possible workaround.
TIA,
- Manish
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Check this out.
 
GeeCON Prague 2014
 
subject: XML doument to a string