axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell" <jasn...@us.ibm.com>
Subject Re: Java2Wsdl Element Name & Complex Type Name issue
Date Fri, 30 Nov 2001 18:34:57 GMT
Hmm... I still prefer the FooType and Foo distinction (particularly since 
I'm relatively anal about schema design ;-) ...)  But, I'll leave the 
decision up to you. 

- James M Snell/Fresno/IBM
    Web services architecture and strategy
    Internet Emerging Technologies, IBM
    544.9035 TIE line
    559.587.1233 Office
    919.486.0077 Voice Mail
    jasnell@us.ibm.com
=================================================================
Have I not commanded you?  Be strong and courageous.  Do not be terrified, 

do not be discouraged, for the Lord your God will be with you wherever you 
go.  
- Joshua 1:9

Please respond to axis-dev@xml.apache.org 
To:     axis-dev@xml.apache.org
cc: 
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)




Mime
View raw message