You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jacob Marcus <ja...@gmail.com> on 2007/08/28 19:56:39 UTC
Complex type names in wsdl starts with lowercase?
I am looking into the wsdl generated from my simple front end java interface
and notice that the complex types are named starting with lowercase if I use
JAXB binding.
For example,
<xs:complexType name="property">
<xs:sequence>
<xs:element minOccurs="0" name="key" type="xs:string"/>
<xs:element minOccurs="0" name="type" type="xs:string"/>
<xs:element minOccurs="0" name="value" type="xs:string"/>
</xs:sequence>
</xs:complexType>
If I use Aegis binding the issue is not there. Is this a known issue? Is
there a way to get JAXB also give the ClassName style names?
Sample complex type using Aegis is,
<complexType name="Property">
<sequence>
<element minOccurs="0" name="key" nillable="true" type="string"/>
<element minOccurs="0" name="type" nillable="true" type="string"/>
<element minOccurs="0" name="value" nillable="true" type="string"/>
</sequence>
</complexType>
Thanks,
Jacob
Re: Complex type names in wsdl starts with lowercase?
Posted by Daniel Kulp <dk...@apache.org>.
Jacob,
This is per JAXB spec. Section 8.12.1 specifically says that the
default mapping is to do the decapicalization.
You can "force" it to use a different name by putting an @XmlType
annotation on the class. In your case:
@XmlType(name = "Property")
It kind of sucks though as you need to do that for ALL classes. There
isn't a global way of setting it.
Dan
On Tuesday 28 August 2007, Jacob Marcus wrote:
> I am looking into the wsdl generated from my simple front end java
> interface and notice that the complex types are named starting with
> lowercase if I use JAXB binding.
>
> For example,
>
> <xs:complexType name="property">
> <xs:sequence>
> <xs:element minOccurs="0" name="key" type="xs:string"/>
> <xs:element minOccurs="0" name="type" type="xs:string"/>
> <xs:element minOccurs="0" name="value" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
>
> If I use Aegis binding the issue is not there. Is this a known issue?
> Is there a way to get JAXB also give the ClassName style names?
>
> Sample complex type using Aegis is,
>
> <complexType name="Property">
> <sequence>
> <element minOccurs="0" name="key" nillable="true"
> type="string"/> <element minOccurs="0" name="type" nillable="true"
> type="string"/> <element minOccurs="0" name="value" nillable="true"
> type="string"/> </sequence>
> </complexType>
>
> Thanks,
> Jacob
--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727 C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog