Forums Register Login
Jaxb2 class source to byte
Hi Everyone,
Here´s the situation:
I have a jaxb2 class and i need to get the byte[] data of this class to get the md5 hashcode of this source.
Actually the hashcode of this object we using to naming the xml file.
So the question is:
Do i need to marshaller to a physical file first or is possible to obtain the hashcode before create the physical xml file?
If is possible before,how can i do this?

This is what i tried to do:
A result object is not a byte array output stream object and a byte array output stream object is not a result object. You cannot apply that cast in line 5. Please explain what you are trying to do.
Thank you for the answer,we solved just changing to

The problem now is that the code works for other´s jaxbClass but not the one we want,and we don´t see any mapping error in this jaxbClass,could you help me figure out what is wrong with this xml class?

Can you post the error message exactly as you get it?
Sorry for the late reply,we already solved,i forgot to mapping in the web.xml the newer jaxb classes.

This thread has been viewed 422 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 19, 2018 01:31:33.