What you are seeing is the default JAX-WS/JAXB mapping.
Why is the decapitalization problem ? There is no currently no
single annotation that allows you to turn off the decapitalization.
But you can use JAX-WS and JAXB annotations to customize
the mapping names to XML names.
You can use JAXB annotations for JAXB bound classes (e.g.
types of web service method parameters or return types).
JAXB annotations consistently define an annotation parameter
name() for customizing the name.
Examples:
@XmlType(name="Actor2") public class Actor2 {...}
@XmlType(name="Module") public enum Module {...}
However, some of the names are bound by JAX-WS not by JAXB.
For customizing the XML names from JAX-WS, I believe you
can use the JAX-WS/JSR 181 annotations. For e.g.
javax.xml.ws.ResponseWrapper.
Thanks,
Sekhar
>
> ------------------------------------------------------------------------
>
> Subject:
> schema generation problem
> From:
> Hamid Mahmood <hamid.mehmood_at_catalisse.com>
> Date:
> Fri, 23 Jun 2006 12:09:24 +0500
> To:
> users_at_jax-ws.dev.java.net
>
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>