FWIW ...  Use of the annotation noted by Daniel (XmlType) is something we
have always done on nearly every one of the custom types our environment
uses.

@XmlType(name = "Group", namespace = "http://groups.vo.common.acme.com/";)

Where the namespace attribute value is explicitly reversed from the
declared package name on the class.

package com.acme.common.vo.groups;

That is just our standard practice and has worked for a couple of hundred
services we run.

Mark


On Mar 26, 2012 10:54 AM, "Daniel Kulp" <[email protected]> wrote:

> On Monday, March 26, 2012 07:39:22 AM arikgold wrote:
> > Hi,
> >
> > I generate a wsdl and xsd files from java classes using java2ws.
> > I have a class named "MyClass"
> > The xsd output contains a complexType named "myClass" - *The initial
> > letter converted to lower case*
>
> This is per JAXB specification.  Section 8.12.1 states:
>
> class name: a class name is mapped to an XML name by de capitalization
> using java.beans.Introspector.decapitalize(classname).
>
> There isn't really a way to change that except for the XmlType annotation.
>
> Dan
>
>
> >
> > Is there any configuration parameter for keeping the complex type name
> > identical to the class name?
> > (Using @XmlType annotation is a workaround, but I don't want to add it in
> > every class I develop)
> >
> > Thanks in advance,
> > Arik Goldstein
> >
> > --
> > View this message in context:
> >
> http://cxf.547215.n5.nabble.com/java2ws-Java-class-name-differs-from-comp
> > lex-type-name-in-the-xsd-tp5595416p5595416.html Sent from the cxf-user
> > mailing list archive at Nabble.com.
> --
> Daniel Kulp
> [email protected] - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>

Reply via email to