cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <>
Subject Elements and Types, request for sanity check.
Date Wed, 05 Dec 2007 18:25:18 GMT
Some stuff you wrote to me quite some time ago has finally begin to
jell, and it raises a design question.

The Javascript generator, so far, maps Xml Schema complex types to
JavaScript classes. And this works just fine until the global elements
show up. 

When global elements are just used buried in sequences, then ignoring
them turns out to work OK, though I am now convinced that there are
lurking problems with anonymous complex types that don't show up in the
test cases I invented. I need to figure out how to code JAXB to provoke
one into existence.

They show up with, as it were, a vengence when parts are elements. You
warned me about this w/r/t RPC some time ago.

The question I'm now wrestling with is this: whether to map both global
elements and global types to javascript classes.

One option is this: if a global element uses a named type, then do as
the code does now: build a javascript class for the type. If it uses an
anonymous type, generate a javascript class associated with the element.
Really, generate as for the type, but use the element's name to
construct the name.

Meanwhile, please see if you agree with the following:

I can't possibly distinguish

@WebMethod(SomeBean b[])


@WebMethod(OtherBean ob)

class OtherBean
   public SomeBean b[];

(in doc/lit/bare) in terms of structure. Nothing in the wsdl will tell
us that the global element in the first case was fabricated to hide the
array under.


View raw message