cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Generating Java from WSDL
Date Thu, 03 Nov 2011 18:41:41 GMT
On Thursday, November 03, 2011 9:50:02 AM harry wrote:
> Glen,
> Thanks for your response. Sorry for posting this on cxf-dev.
> Can you point me to where in the JAX-WS it mentions that methods can not
> have underscores? I can't find it.

Section 2.8 of the JAX-WS spec basically delegates the XML Name mapping to 
Appendix C of the JAXB 1.0 spec except for a few alterations (like not adding 
"get/set" to the beginning).   However, in the more recent JAXB specs (JAXB  
2.1 spec for example), it's moved to Appendix D.   If you grab that spec and 
look at it, it's a 9 page appendix describing how XML names get mapped for 
various usages.   For method names and class names, the "_" gets dropped and 
the letter immediately following it gets capitalized.   

As Glen alluded, the JAXB global binding for the underscore handling wouldn't 
apply to this part as this mapping is part of the JAX-WS spec, not really 
JAXB.  (I know, it's confusing)   You CAN use a JAX-WS binding file (Chapter 8 
of JAX-WS spec) to map the operation names differently, but it's a "per 
operation" mapping.  There isn't a global setting for it.


> The reason I ask, is because if that is the case then maybe the WSDL should
> not be allowed to have underscores to begin with. Also, AXIS2 works fine and
> generates methods with the underscores intact.
> I want to understand if this is a bug in metro/cxf or mandated by the
> standard. If it is mandated in the standard, I think there is a disconnect
> between the WSDL definition standard and JAX-WS specification.
> tia,
> harry
> Glen Mazza (Talend) wrote:
> > Harry, these questions should be asked on the CXF-USER's list -- many
> > more people, including the CXF devs on CXF-DEV,
> > are on it.
> > 
> > bindings.xjb I believe is just for JAXB (your POJOs that handle the
> > request and responses)-- it shouldn't have an effect on JAX-WS method
> > mappings, which are defined in the JAX-WS specification (which CXF
> > implements) and most probably mandate the removal of the underscore.
> > (You'd have the same issue if you used Metro:
> >  I'm not sure
> > there's anything we can do about that.
> > 
> > Glen
> > 
> > On 11/01/2011 03:33 AM, harry wrote:
> >> When I try to generate java code from WSDL, underscore(_) is missing
> >> from method name. Example getGetType_Machine() changes to
> >> getGetType_Machine().
> >> Though in the WSDL method name is ok. I tried using bindings.xjb with
> >> global
> >> bindings for underscore but that didn't help.
> >> So if you guys could please help me.
> >> Thanks in advance.
> >> 
> >> --
> >> View this message in context:
> >>
> >> 54507.html Sent from the cxf-issues mailing list archive at
> >>
> --
> View this message in context:
> 639.html Sent from the cxf-dev mailing list archive at
Daniel Kulp
Talend -

View raw message