take a look at the sun coding standards.

also, i am assuming you are using beanMappings -- these follow javabean
introspection rules, so you need follow that standard to get reliable
results.



-----Original Message-----
From: Steve Pannier [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2003 2:24 PM
To: [EMAIL PROTECTED]
Subject: Capitalization issue with Java2WSDL


Hello all.

Axis-1_1RC2:  I'm using Java2WSDL to generate WSDL for my service. I
have class properties that start with an upper case letter.  The
generated WSDL, however, contains the property name with the first
letter lower case.

Why does Java2WSDL do this?  Is there a way to force it to generate WSDL
maintaining the capitalization of each class member?


Here's an example:

package test;
public class Foo {
    public Bar getData (  ) {
        return null;
    }
}


package test;
public class Bar {
    private String Str1 = null;
    private String Str2 = null;

    public String getStr1() {
        return this.Str1;
    }
    public void setStr1( String str ) {
        this.Str1 = str;
    }
    public String getStr2() {
        return this.Str2;
    }
    public void setStr2( String str ) {
        this.Str2 = str;
    }
}

I run the command "
java -classpath c:\wsdl\TestToWsdl\RPC-Style\Test-Java2WSDL;%AXIS_DIR%
\axis.jar;%AXIS_DIR%\jaxrpc.jar;%AXIS_DIR%\saaj.jar;%AXIS_DIR%
\wsdl4j.jar;%AXIS_DIR%\commons-logging.jar;%AXIS_DIR%
\commons-discovery.jar;c:\xerces.jar org.apache.axis.wsdl.Java2WSDL -l
http://10.150.5.147:8091/axis/services/Foo -s FooPort -S Foo -o Foo.wsdl
test.Foo".

The types section of the generated WSDL follows (note that "str1" and
"str2" are not capitalized.):

 <wsdl:types>
  <schema targetNamespace="http://test"; xmlns
="http://www.w3.org/2001/XMLSchema";>
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="Bar">
    <sequence>
     <element name="str2" nillable="true" type="xsd:string"/>
     <element name="str1" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
  </schema>
 </wsdl:types>


Regards.


Steve Pannier
Jacada, Inc.
(763) 201-0002 Ext. 219
[EMAIL PROTECTED]
http://www.jacada.com


Reply via email to