|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Blob variable not converted to xmlHi All, XStream is an excellent API and it has helped me a lot. I’ve encountered a roadblock now and need your
help. There’s a class which has a variable of type Blob.
I’ve realized, when the object of this class is being converted to XML,
the variable with data type Blob is being set as null. Hope you can help me out to resolve this issue. The variable holds files, docs or images hence the
data type is Blob. A simple class structure would be public class Test{ private long id; private java.sql.Blob document; public void setDocument(java.sql.Blob document) { this.document = document; } } This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient. If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and associated companies, (collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects. |
|
|
Re: Blob variable not converted to xmlHi,
nischal wrote at Montag, 21. September 2009 07:04: > Hi All, > > > XStream is an excellent API and it has helped me a lot. > > I've encountered a roadblock now and need your help. > > There's a class which has a variable of type Blob. I've realized, when the > object of this class is being converted to XML, the variable with data > type Blob is being set as null. > > Hope you can help me out to resolve this issue. > > The variable holds files, docs or images hence the data type is Blob. > > A simple class structure would be > > > public class Test{ > private long id; > private java.sql.Blob document; > public void setDocument(java.sql.Blob document) > { > this.document = document; > } > } Can you show the resulting XML? java.sql.Blob itself is an interface, so I cannot say anything about the real object that you try to serialize. - Jörg --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: Re: Blob variable not converted to xmlSorry, I'm not allowed to post the class or xml :(
To be precise, the XML was creating an empty element. In the same class as described below for example: The tag would be: <document/> I've decided to use byte[] instead of Blob as the data type. It seems to work fine for now. Thanks a lot for taking time to reply though. -----Original Message----- From: news [mailto:news@...] On Behalf Of Jörg Schaible Sent: Monday, September 21, 2009 3:14 PM To: user@... Subject: [xstream-user] Re: Blob variable not converted to xml Hi, nischal wrote at Montag, 21. September 2009 07:04: > Hi All, > > > XStream is an excellent API and it has helped me a lot. > > I've encountered a roadblock now and need your help. > > There's a class which has a variable of type Blob. I've realized, when the > object of this class is being converted to XML, the variable with data > type Blob is being set as null. > > Hope you can help me out to resolve this issue. > > The variable holds files, docs or images hence the data type is Blob. > > A simple class structure would be > > > public class Test{ > private long id; > private java.sql.Blob document; > public void setDocument(java.sql.Blob document) > { > this.document = document; > } > } Can you show the resulting XML? java.sql.Blob itself is an interface, so I cannot say anything about the real object that you try to serialize. - Jörg --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --- This e-mail message may contain confidential, proprietary or legally privileged information. It should not be used by anyone who is not the original intended recipient.If you have erroneously received this message, please delete it immediately and notify the sender. The recipient acknowledges that 3i Infotech or its subsidiaries and associated companies, (collectively "3i Infotech"), are unable to exercise control or ensure or guarantee the integrity of/over the contents of the information contained in e-mail transmissions and further acknowledges that any views expressed in this message are those of the individual sender and no binding nature of the message shall be implied or assumed unless the sender does so expressly with due authority of 3i Infotech. Before opening any attachments please check them for viruses and defects. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |