Serializing org.w3c.dom.Document into String and passing this as JMS
object message is working nicely. 
DOM document is built back again by parsing ByteArrayInputStream made of
string.

-----------
Reddy Pingili

> -----Original Message-----
> From: Pingili, Madhupal 
> Sent: Friday, August 06, 2004 12:39 PM
> To:   'Struts Users Mailing List'
> Subject:      RE: [OT] DOM Document as JMS message object's container
> 
> 
> Thanks for your suggestions.
> The main reason to create an object (that contains Document as a member
> and provide methods) is to eliminate the need to store the document.
> Somehow, if we can pass this object as JMS object message, then the
> consumer can use it for processing the request.
> 
> Now, I am trying to serialize org.w3c.dom.Document into String using Xalan
> 
> serializer and pass this String as JMS object message.
> I have to test this and see if it works.
> 
> I will post the result after testing.
> 
> ------------
> Reddy Pingili
>   
> 
> > -----Original Message-----
> > From:       Erik Weber [SMTP:[EMAIL PROTECTED]
> > Sent:       Thursday, August 05, 2004 5:59 PM
> > To: Struts Users Mailing List
> > Subject:    Re: [OT] DOM Document as JMS message object's container
> > 
> > Perhaps the XML document could be stored elsewhere, and the object you 
> > embed in your JMS message could be of a simpler type which just contains
> 
> > a URI for the XML document. Then, the object that receives the JMS 
> > message could be a "reconstruction" wrapper, basically, that can use the
> 
> > URI to reconstruct an instance of your original type (which contains the
> 
> > Document and all the methods, etc.), and pass this on to whatever object
> 
> > was going to receive the message in the first place. You might have a 
> > matching "deconstruction" wrapper at the front of JMS -- a guy who might
> 
> > extract the Document from your original object, store it, and create the
> 
> > new URI-containing object and enqueue it to JMS.
> > 
> > Then in the future if you find a way to Serialize all the objects you 
> > need to embed, you just get rid of the wrappers.
> > 
> > Also, I don't know if the XBeans project is still around, but a few 
> > years back, its purpose was to make it easy to build systems that pass 
> > around XML documents as messages (it used JavaBeans that fired "DOM 
> > Events" as I recall). It was looking pretty good, but then I remember 
> > that development seemed to just cease on it. I would contact the lead 
> > developer and never hear back from him.
> > 
> > Erik
> > 
> > 
> > Pingili, Madhupal wrote:
> > 
> > >This is way Off Topic. 
> > >
> > >I have an object that implements Serializable in order to be sent to
> JMS
> > >Queue destination.
> > >This object contains org.w3c.dom.Document as private member and creates
> a
> > >new DOM document
> > >in it's constructor. It also has other methods to access
> > >document.createElement(...), createTextNode(...) etc.
> > >
> > >Now, I am getting an error "MQJMS1060: Unable to serialize object".
> > >I found out that this is because Document is not Serializable inside
> the
> > >message object.
> > >
> > >Can anyone tell me if there is an implementation of
> org.w3c.dom.Document
> > >that is Serializable?
> > >OR is this the wrong design and I should just build another type of JMS
> > >message? 
> > >
> > >Any direction to solve this problem or better design will be helpful.
> > >
> > >----------
> > >Reddy Pingili
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >  
> > >
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to