This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes JAXB Class Customization of XML SimpleTypes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JAXB Class Customization of XML SimpleTypes" Watch "JAXB Class Customization of XML SimpleTypes" New topic
Author

JAXB Class Customization of XML SimpleTypes

Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 598

Hi guys,

I am currently using the maven-jaxb plugin to generate Java classes from XML schemas, but I am running into naming collisions in the object factory.
I managed to get around this problem by applying class customizations in the bindings file.

Now, this works perfectly if I am applying the bindings to a ComplexType but if I try apply customizations to a SimpleType XJC gives me the following error :


SAXParseException2: compiler was unable to honor this class customization. It is attached to a wrong place, or its inconsistent with other bindings.

What am I doing wrong?


===>SCJP 1.5(72%)<===
==>SCWCD1.5(76%)<===
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 499
    
    3
SAXParseException2: compiler was unable to honor this class customization. It is attached to a wrong place, or its inconsistent with other bindings.
What am I doing wrong?

The error message determines two causes for you...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JAXB Class Customization of XML SimpleTypes
 
Similar Threads
General question on JAXB annotations generated when using xjc
Top-Down approach: WSDL, JAX-WS and JAXB
How to add JAXB customization to a particular element of an xsd?
Wsimport and jaxb binding issue
invalid element extension for package name customization