You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by mlabarre <mi...@helicom.fr> on 2013/06/14 16:12:00 UTC

Service name and port type name transformation

Hello
During the last days, I write a client generator based on CXF 2.6.7 and
calling wsdl2java to generate classes from WSDL. 
The generated classes name differ with the names coded in WSDL, ie if I have
a <wsdl:Service> or <wsdl:portType>  with a name as XXX_YYYY the class is
named XXXYYYY. 
What is the method used to do that : you keep only alphanumeric chars ? It
to do the same thing as you in my code

Many thanks



--
View this message in context: http://cxf.547215.n5.nabble.com/Service-name-and-port-type-name-transformation-tp5729293.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Service name and port type name transformation

Posted by Daniel Kulp <dk...@apache.org>.
On Jun 14, 2013, at 10:12 AM, mlabarre <mi...@helicom.fr> wrote:

> Hello
> During the last days, I write a client generator based on CXF 2.6.7 and
> calling wsdl2java to generate classes from WSDL. 
> The generated classes name differ with the names coded in WSDL, ie if I have
> a <wsdl:Service> or <wsdl:portType>  with a name as XXX_YYYY the class is
> named XXXYYYY. 
> What is the method used to do that : you keep only alphanumeric chars ? It
> to do the same thing as you in my code

This is specified in Appendix D of the JAXB spec.   It's a bit long and complicated so I'd suggest just grabbing the spec and looking at it.

Alternatively, just use CXF's org.apache.cxf.common.jaxb.JAXBUtils.nameToIdentifier method.   :-)

Dan



> 
> Many thanks
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Service-name-and-port-type-name-transformation-tp5729293.html
> Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com