aspose file tools
The moose likes XML and Related Technologies and the fly likes Question about JAXB Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Question about JAXB" Watch "Question about JAXB" New topic
Author

Question about JAXB

daming wang
Greenhorn

Joined: Jul 28, 2004
Posts: 27
Hi,

I am working with JAXB2.0 based on Java6, I was confused with some SUN's default implementation, do you have any suggestion about them? thanks in advance!

1. When marshalling, the generated xml alway contains name space declarition, how can I remove the namespace prefix, just let the xml use the default namespace, looks like



2. For some reason, I have several xml root element named Request, so they need use different namespaces. And I put the output java class into the same package, the result is the marshalling xml contain other namespace, but in fact the content of xml does not refer them.



scjp,scjd,scea
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Hi Daming,
Your question has nothing to do with web services.
Let me move this question to our XML forum where you might get responses.
Thank you.
Regards,
Balaji
[ June 07, 2008: Message edited by: Balaji Loganathan ]

Spritle Software Blogs
daming wang
Greenhorn

Joined: Jul 28, 2004
Posts: 27
Thanks Balaji, I read the doc for JAXB, found that SUN's implementation use package mapping to namespace, and I did not see anything to customize the behavior.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Question about JAXB
 
Similar Threads
.Net Client for Axis Web services
JAXB Validation Issue - [org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of el
Java Objects to XML creation using JAXB
JAXWS client SOAP manipulation
Missing wsdl namespace on wsdl file generated using wsgen