axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
Subject RE: Java2Wsdl Element Name & Complex Type Name issue
Date Fri, 30 Nov 2001 21:18:36 GMT

Yes, I added a utility function in Emitter.java back when it was (basically)
the only Wsdl2java class file.  See revision 1.21 of Emitter.java.  The
function getTypeName().

I had the names reversed.  The java name was based on the complexType name=
if there was one, and if not we used the element name=.  I remember doing
this because .NET WSDL didn't define an element name and Wsdl2java was
crashing on it.

--
Tom Jordahl


-----Original Message-----
From: R J Scheuerle Jr [mailto:scheu@us.ibm.com]
Sent: Friday, November 30, 2001 2:51 PM
To: axis-dev@xml.apache.org
Subject: RE: Java2Wsdl Element Name & Complex Type Name issue


You added this code to Wsdl2Java ?

So if the complexType is only used once in a type= attribute, you generate
a java name based on the name of the referencing element?

Please clarify.

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


 

                    Tom Jordahl

                    <tomj@macromed       To:     "'axis-dev@xml.apache.org'"
<axis-dev@xml.apache.org> 
                    ia.com>              cc:

                                         Subject:     RE: Java2Wsdl  Element
Name & Complex Type Name  
                    11/30/2001            issue

                    01:09 PM

                    Please respond

                    to axis-dev

 

 





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
Macromedia


-----Original Message-----
From: R J Scheuerle Jr [mailto:scheu@us.ibm.com]
Sent: Friday, November 30, 2001 1:23 PM
To: axis-dev@xml.apache.org
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