The JAXB customizations only apply to the stuff that JAXB handles, which is
the schemas. It wouldn't apply to the JAX-WS generated stuff.
For your case, you would need something like:
<jaxws:bindings wsdlLocation="./proactive.wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
<jaxws:bindings
node="/wsdl:definitions/wsdl:servi...@name='HelloWorldServer_Service']">
<jaxws:class name="HelloWorldServer_Service"/>
</jaxws:bindings>
</jaxws:bindings>
Dan
On Thu May 14 2009 6:19:17 pm Valerio Schiavoni wrote:
> Hello,
> I have a wsdl file, which defines a service whose name is:
> <wsdl:service name="HelloWorldServer_Service">
>
> for internal reason, I want the resulting class to be named exactly as
> the service. By default, jaxb trims away the '_' and it generates a
> class called HelloWorldServer_Service.
>
> So, i created a jaxb mapping.xml file, trying to force jaxb to keep
> that '_' characters.
>
> <jaxws:bindings wsdlLocation="./proactive.wsdl"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
> xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
> <jaxb:globalBindings underscoreHandling="asCharInWord"/>
> </jaxws:bindings>
>
> and it used by cxf-codegen-plugin as usual by defining:
> <bindingFiles>
> <bindingFile>
> ${basedir}/src/main/resources/wsdl/mapping.xml
> </bindingFile>
> </bindingFiles>
>
> Nevertheless, the resulting class still doesn't contain '_' in the
> name. I'm not sure to understand the reasons..
>
> I am using cxf 2.2.1
>
> Thanks
> valerio
--
Daniel Kulp
[email protected]
http://www.dankulp.com/blog