axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stickley, Jim" <JStick...@birch.com>
Subject RE: Attribute's corrupted with WSDL2Java
Date Mon, 10 Jun 2002 16:10:14 GMT
Also what if we have a WSDL definition as follows:

 

   <complexType name="MyData">
    <complexContent>
      <sequence>
       <element name="CREATE_BY" nillable="true" type="xsd:string"/>
       <element name="LAST_MOD_BY" nillable="true" type="xsd:string"/>

       < element name="CREATEBY" nillable="true" type="xsd:string"/>
      </sequence>
     </extension>
    </complexContent>
   </complexType>



Now WSDL2Java will generate code with a duplicate symbol and the generated
code will not be able to distinguish CREATE_BY from CREATEBY.

 

While it is nice to generate more readable code, in the world of code
generators, one should strive for perfect converters. 

 

Another argument to retain an unmangled name is documentation.  A good
server will have documentation defining these elements, it will be confusing
to a client when they attempt to match documentation to a mangle set of
code.

 

Jim Stickley

Birch Telecom

(816) 300-6743

jstickley@birch.com

 

-----Original Message-----
From: Stickley, Jim [mailto:JStickley@birch.com] 
Sent: Monday, June 10, 2002 10:41 AM
To: 'axis-user@xml.apache.org'
Subject: RE: Attribute's corrupted with WSDL2Java

 

I understand what you are say, but this is not a very robust conversion.
The biggest problem with this is that the WSDL file used in this example was
generated from Java source, and the java source had underscores, now the
generated source does not match the original source, thus the jar file for
the generated source is not interoperable with the original source.

 

Jim Stickley

Birch Telecom

(816) 300-6743

jstickley@birch.com

 

-----Original Message-----
From: butek@us.ibm.com [mailto:butek@us.ibm.com] 
Sent: Monday, June 10, 2002 10:12 AM
To: axis-user@xml.apache.org
Subject: Re: Attribute's corrupted with WSDL2Java

 

This isn't a bug. This is what JAX-RPC specifies. It tries to convert XML
names to Java conventional names. One of the rules is, remove each
underscore and force the following character to upper case.

Note that this ONLY affects the Java mappings. What goes across the wire is
the original XML name.

Russell Butek
butek@us.ibm.com

Please respond to axis-user@xml.apache.org 

To: "'axis-user@xml.apache.org'" <axis-user@xml.apache.org>
cc: 
Subject: Attribute's corrupted with WSDL2Java





Any class that has attributes that have underscores in it are not generated
correctly, i.e. the underscores are removed!

 

Example WSDL (minus unrelated structures):

   <complexType name="MyData">

    <complexContent>

      <sequence>

       <element name="CREATE_BY" nillable="true" type="xsd:string"/>

       <element name="LAST_MOD_BY" nillable="true" type="xsd:string"/>

      </sequence>

     </extension>

    </complexContent>

   </complexType>

 

 Java code generated by WSDL2Java (minus unrelated code):

 

public class CSRSessionData  extends implements java.io.Serializable {

    private java.lang.String CREATEBY;

    private java.lang.String LASTMODBY;

 

    public CSRSessionData() {

    }

 

    public java.lang.String getCREATEBY() {

        return CREATEBY;

    }

 

    public void setCREATEBY(java.lang.String CREATEBY) {

        this.CREATEBY = CREATEBY;

    }

 

    public java.lang.String getLASTMODBY() {

        return LASTMODBY;

    }

 

    public void setLASTMODBY(java.lang.String LASTMODBY) {

        this.LASTMODBY = LASTMODBY;

    }

}

 

I believe this to be a bug in the WSDL2Java generator.

 

Jim Stickley

Birch Telecom

(816) 300-6743

jstickley@birch.com

 


Mime
View raw message