• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jaxb2 class source to byte  RSS feed

 
Rômulo Sorato
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rômulo Sorato
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the error message exactly as you get it?
 
Rômulo Sorato
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the late reply,we already solved,i forgot to mapping in the web.xml the newer jaxb classes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!