M
Manish Hatwalne
I am doing lot of XML parsing in my JWS application. If the application is
run as a standalone application, it runs properly. But when I run it as a
JWS enabled application, it is giving me some problems. It throws an
exception while running following code -
public String XMLDocumentToString(Node node) { try { Transformer
xsltIdentity = TransformerFactory.newInstance().newTransformer();
DOMSource domSource = new DOMSource(node); StringWriter stringWriter = new
StringWriter(); StreamResult streamResult = new
StreamResult(stringWriter); xsltIdentity.transform(domSource,
streamResult); return stringWriter.toString(); } catch(Exception e)
{ System.out.println("Can not convert XML document to String " + e);
return null; } }
The exception thrown by the JWS is -
Can not convert XML document to String
org.apache.xml.utils.WrappedRuntimeException: Output method is xml could not
load output_xml.properties (check CLASSPATH)
The code DOES work as a standalone application, so that is not a problem.
How do I get it to work with JWS? Is there any other way of converting XML
doc to a String.
- Manish
run as a standalone application, it runs properly. But when I run it as a
JWS enabled application, it is giving me some problems. It throws an
exception while running following code -
public String XMLDocumentToString(Node node) { try { Transformer
xsltIdentity = TransformerFactory.newInstance().newTransformer();
DOMSource domSource = new DOMSource(node); StringWriter stringWriter = new
StringWriter(); StreamResult streamResult = new
StreamResult(stringWriter); xsltIdentity.transform(domSource,
streamResult); return stringWriter.toString(); } catch(Exception e)
{ System.out.println("Can not convert XML document to String " + e);
return null; } }
The exception thrown by the JWS is -
Can not convert XML document to String
org.apache.xml.utils.WrappedRuntimeException: Output method is xml could not
load output_xml.properties (check CLASSPATH)
The code DOES work as a standalone application, so that is not a problem.
How do I get it to work with JWS? Is there any other way of converting XML
doc to a String.
- Manish