This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Jaxb2 class source to byte  RSS feed

 
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:
 
Marshal
Posts: 59700
187
  • 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?

 
Sheriff
Posts: 5015
138
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!