File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JaxbElement creating namespace in xml

 
Suben Naidoo
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic