axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <>
Subject RE: Java2Wsdl Element Name & Complex Type Name issue
Date Fri, 30 Nov 2001 19:09:47 GMT

At some point in time, I put in a function that uses the element name if it
exists, and if it doesn't, it uses the complexType name.

It looks like this functionality got lost in the shuffle.
Do we believe this is the wrong thing to do (due to JAX-RPC or otherwise)?

Tom Jordahl

-----Original Message-----
From: R J Scheuerle Jr []
Sent: Friday, November 30, 2001 1:23 PM
Subject: Java2Wsdl Element Name & Complex Type Name issue

James brought up the point that the element name in the
wsdl should match the name of the class (and the complex
type name should be different):

    public class Foobar {}
    <complexType name="FoobarType" />
    <element name="Foobar" type="FoobarType" />

The problem is that the Wsdl2Java looks at the complexType name to
determine the name of the java class bindings to build.  So I would
be in favor of using the same name for both:

    public class Foobar {}
    <complexType name="Foobar" />
    <element name="Foobar" type="Foobar" />

This makes the Java2Wsdl implementation easier.  Otherwise the code
would need to determine (when generating the type= attribute) whether
the type was emitted by the emitter (thus append Type) or is a known type
(don't append Type).

One caveat:  The Wsdl2Java emitter does not currently support complexType
and element with
the same name.  Russell has this on his to-do list.

Thoughts ?

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)

View raw message