This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Services and the fly likes JaxbElement creating namespace in xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "JaxbElement creating namespace in xml" Watch "JaxbElement creating namespace in xml" New topic
Author

JaxbElement creating namespace in xml

Suben Naidoo
Greenhorn

Joined: Jan 27, 2011
Posts: 1
Hi

How do i get JAxbelement NOT to create a namespace in XML. I need to create JaxbElement because when i marshall i get an error no @XMLRootElement found.
I do not want to change the XSD to fix this issue as the XSD is a local standard.
I added the root element using JAXBElement but it creates a namespace which causes problems when unMarshalling the xml.



I get the following error when unMarshalling the XML:
Error [1,189]: cvc-complex-type.2.4.a: Invalid content was found starting with element 'CorruptBatchContinueOnError'. One of '{"http://schemas.phisc.org.za/draft/claim":CorruptBatchContinueOnError}' is expected.


Here is the XML created when using the above code to create the root element:


 
GeeCON Prague 2014
 
subject: JaxbElement creating namespace in xml