Forums Register Login

How to pass XML Document from one EJB to another EJB?

+Pie Number of slices to send: Send
Hi All,
While trying to pass XML Document from one EJB to another EJB, I got NotSerializableException? Later I found that org.w3c.dom.Document is not serializable. Then I thought I can convert the xml to string and pass it. But I couldn't find any API's for directly parsing the xml string (I am using JAXP). Since it is not possible to use IO classess in EJB, can anybody suggest me any alternatet ways to do this.
Thanks in advance.
Regards,
+Pie Number of slices to send: Send
Hi
You could probally use InputSource to conver the Document object into a string that can be sent to the EJB Server. Have a look at it in the API
Vivek
+Pie Number of slices to send: Send
I know how to convert the Document to string i.e. like this
Document doc = ....
org.apache.crimson.tree.XmlDocument xmlDoc = (XmlDocument) doc;
String xmlString = xmlDoc.toString();
I want to how to convert the string which contains the valid xml content (in this case xmlString) to form DOM Document.
Please help.
Regards,
Jayakumar
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 879 times.
Similar Threads
Searching XML
Using a parsed XML document
XML String to EJB
SAXException: Start root element expected.
xml transformation
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:03:04.