users@jaxb.java.net

Re: Help on retaining XML->Java mapping

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 23 Aug 2005 09:54:21 -0700

Venkat Reddy wrote:
> I work with Ashutosh, and thought I would also throw some light on
> this problem we are trying to solve.

Thanks.

> Given an XML schema, we need a means to prepare a map of all the XML
> types encountered in the schema with the corresponding JAXB specific
> Java type names. This information is required for us in some other
> code generation process.

I see.

> We thought that, the JAXB compiler should provide a means to get a
> collection or map of all the XML types / Java types in a way that is
> independent of vendor-specific JAXB compiler. In other words, we felt
> that JAXB API should enforce this facility on the JAXB compiler.
>
> May be I lack the full knowledge of the API. Please guide us if there
> is already an existing means to meet this need, in a vendor-neutral
> way.

I'm afraid there's no vendor-independent way of doing this. There's no
compile-time tool API for JAXB. You can, however, define your own
abstraction layer and hide the implementation specific aspects.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com