I am creating a mapping file so I should be able to leave
the class parameter as null, correct?
From: Leo Joncas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 10, 2005 2:07 PM
To: [email protected]
Subject: RE: [castor-user] Unmarshalling from a byte[] stream
Assuming that you have an appropriate InputStream
instance for reading the byte array (such as a ByteArrayInputStream), then just
wrap it in a reader, such as
new
InputStreamReader(byteInputStream)
and
then pass this reader to the Unmarshaller's unmarshal (instance, not static)
method.
You
also need to construct the Unmarshaller with the Class of message being
unmarshalled, so if there is more than one possible class, you'll need
additional logic to construct an appropriate Unmarshaller
instance.
Leo
Joncas
-----Original Message-----
From: Green, Jason M. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 10, 2005 1:52 PM
To: [email protected]
Subject: [castor-user] Unmarshalling from a byte[] stream
From: Green, Jason M. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 10, 2005 1:52 PM
To: [email protected]
Subject: [castor-user] Unmarshalling from a byte[] stream
Hey all,
I
am getting an xml document from a webservice that returns it as a byte[].
Does the unmarshal function support this? The javadoc seemed unclear to
me. If it is allowed, how would I set that up?
Jason

