• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Jaxb2 class source to byte

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79707
381
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic