users@jaxb.java.net

RE: JAXB Package Solution

From: Lichtenwalter, Ryan <ryan.lichtenwalter_at_lmco.com>
Date: Mon, 30 Oct 2006 09:09:01 -0600

I apologize, but the response you provided to me was unclear. Before
further questions, I decided to try what I thought you meant. I
downloaded a new (I think, but I was already using JAXB 2.0 that came
with the NetBeans SJSAS9 bundle) version of JAXB 2.0 from the following
location:

https://jaxb.dev.java.net/files/documents/51/43091/JAXB2_20061030.jar

I remove my previous installation. I install this version. I recompile.

The package is still:
        org.w3._2001.xmlschema
The class is still:
        Adapter1.java

I appreciate the time you gave in your previous response. Please advise
how I can change the output of the compile so that these names are
specifiable.

Ryan Lichtenwalter
Lockheed Martin Corporation
Software Development
651-456-7590


-----Original Message-----
From: Kohsuke Kawaguchi [mailto:Kohsuke.Kawaguchi_at_Sun.COM]
Sent: Friday, October 27, 2006 12:50 PM
To: users_at_jaxb.dev.java.net
Subject: Re: JAXB Package Solution

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/p
> ac
> 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