users@jaxb.java.net

Re: JAXB Package Solution

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 27 Oct 2006 10:50:21 -0700

Lichtenwalter, Ryan wrote:
> Greetings,
> Regarding the solution at
> https://jaxb.dev.java.net/guide/Customizing_Java_packages.html
> When I try to do this, and make the following xjc call
> xjc -b binding.xjb THE_SFIX.xsd SCHEMA_TO_COMPILE.xsd
> where THE_FIX is a direct copy of the schema on that web page, I get the
> following errors
> parsing a schema...
> [ERROR] compiler was unable to honor this schemaBinding customization.
> It is attached to a wrong place, or its inconsistent with other
> bindings.
> line 6 of
> file:/C:/Documents%20and%20Settings/rlichten/Desktop/JAXB%20Compiler/pac
> kageNameFixer.xsd
> [ERROR] (the above customization is attached to the following location
> in the schema)
> unknown location
> Failed to parse a schema.
> Why is JAXB outputting the schema package with this name? Is there any
> other fix for this that doesn't involve an additional file? What could
> be going wrong here and how can I get it working? In case it helps, the
> reason this came up is I am specifying methods that xjc is using to
> create an adapter for a custom type association
> Xml:dateTime to java.sql.Timestamp
> It generates an adapter called Adapter1 (can I somehow change this name)
> under the package org.w3._2001.xmlschema
> Thanks for any assistance.

This was a bug. I fixed that in 2.0.x line. You can get the snapshot
build from the website.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com