users@jax-ws.java.net

schema generation problem

From: Hamid Mahmood <hamid.mehmood_at_catalisse.com>
Date: Fri, 23 Jun 2006 12:09:24 +0500

Hello,

I have a question regarding schema generation for a Webservice. I have a
Webservice method and its schema given below. The problem is that it
translates the classes name starting from capital letters to small like
Parent to parent, Actor2 to actor2 and Module to module. I dont want
this thing to open, the class name should be exactly the same (case
sensitive). Please tell me if I am doing something wrong.

@WebMethod
public Parent sayHello(Actor2 objActor, Module enumType)
{
Parent obj = new Parent();
if(enumType == Module.ADMIN)
obj.setId(111);
if(enumType == Module.BILL)
obj.setId(112);
if(enumType == Module.IMPORT)
obj.setId(113);
if(enumType == Module.INVENTORY)
obj.setId(114);
if(enumType == Module.REGISTRATION)
obj.setId(115);

obj.setName("A CME");
obj.setDateOfBirth(new GregorianCalendar(1981, 5, 6));
this.setActor2(objActor);
return obj;
}

the schema generated for this is:
<xs:schema version="1.0" targetNamespace="http://example2.com">
-
<xs:element name="sayHello" nillable="true">
<xs:complexType/>
</xs:element>
-
<xs:element name="sayHelloResponse" nillable="true">
<xs:complexType/>
</xs:element>
-
<xs:complexType name="actor2">
-
<xs:sequence>
<xs:element name="id" type="xs:int"/>
<xs:element name="name" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
-
<xs:complexType name="parent">
-
<xs:sequence>
<xs:element name="dateOfBirth" type="xs:dateTime" minOccurs="0"/>
<xs:element name="id" type="xs:long"/>
<xs:element name="name" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
-
<xs:simpleType name="module">
-
<xs:restriction base="xs:string">
<xs:enumeration value="INVENTORY"/>
<xs:enumeration value="IMPORT"/>
<xs:enumeration value="BILL"/>
<xs:enumeration value="REGISTRATION"/>
<xs:enumeration value="ADMIN"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

thanks and Regards
Hamid mahmood