[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [nm-wg] Schema to Source Code Generators



Hi,

Have you tried the Axis utilities? WSDL2Java may generate reasonable code 
for you. I had tried to use it on the last set of WXS schemas but it 
didn't like the SubstitutionGroups but is fine otherwise so I gave up. 
However, Trang doesn't generate substitutionGroups, so we're fine.

I've just tried it: it seems to ignore some namespaces (but this might be 
a Trang thing, or my RNGs) (you have to specify an output directory, 
otherwise it tries to write to "/"), but as long as you use the 
-H|--helperGen flag, the individual classes seem to come out OK. The 
Helper classes contain all the axis-specific (de)serialisation stuff that 
would otherwise get put in the classes themselves.

Unfortunately, you need rather a lot of libraries to get Axis working.

I've not found anything for Perl as yet, though.

Paul

On Thu, 4 Mar 2004, Tanya Brethour wrote:

> 
> Hi! I've been searching for a tool that can take the nm-wg schema and
> automatically generate Java class files for me. This will obviously make
> it really easy to update the Advisor when a new schema comes out.
> 
> I have found a couple (Castor, JAXB, Relaxer, etc) but either they
> generated too much extra stuff and make the classes overally complicated
> or they choke when reading the schema (missing elements, can't handle 
> imports, etc). 
> 
> Has anyone had any luck using a generator for their project? I don't
> just mean generating Java classes.. any language would do. I'm
> interested in hearing your experiences. Did you have to modify the schema
> in any way?
> 
> Thanks,
> Tanya Brethour
> NLANR/DAST
> 

-- 
Paul Mealor
  --+->    pdm@hep.ucl.ac.uk    <-+--
  <-+-- www.hep.ucl.ac.uk/~pdm/ --+->
    |     +44 (0)20 7679 3044   <-+--
  --+->         x33044            |