I will take this up with the committee which controls the standards for JAX-RPC.  Thanks for your feedback.

 

Jim Stickley

Birch Telecom

(816) 300-6743

[EMAIL PROTECTED]

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 12:25 PM
To: [EMAIL PROTECTED]
Subject: RE: Attribute's corrupted with WSDL2Java

 

I can't disagree with you. All I can say is that JAX-RPC dictates this and we must follow JAX-RPC. The potential for name clashes is a big failing. Perhaps this will be addressed if anyone works on a JAX-RPC version 2.

Russell Butek
[EMAIL PROTECTED]

Please respond to [EMAIL PROTECTED]

To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject: RE: Attribute's corrupted with WSDL2Java





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

[EMAIL PROTECTED]

 

-----Original Message-----
From: Stickley, Jim [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 10:41 AM
To: '[EMAIL PROTECTED]'
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

[EMAIL PROTECTED]

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 10:12 AM
To: [EMAIL PROTECTED]
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
[EMAIL PROTECTED]

Please respond to [EMAIL PROTECTED]

To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
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

[EMAIL PROTECTED]

 

Reply via email to