tags:

views:

26

answers:

1

We're using apache cxf 2.2.2 with JaxB and I need to change the wsdl:definitions name of an exported wsdl to something else. Does anyone know how I could change it, possibly via a JAXB annotation?

+1  A: 

Assuming you mean the name attribute of the <wsdl:definitions> element, that's set by the serviceName attribute of the @WebService annotation on your main implementation class. If you need any deeper configuration than that, you'll have to tell CXF to serve up your own custom WSDL instead of that which is derived from annotations (I've not experimented with doing that).

Donal Fellows
In the @WebService annotation there is a method called `wsdlLocation` where you can configure the location. The location is a file on the classpath relative to something in your deployment, but I don't think it is consistent across implementations (some required it in the META-INF, others not), so you would have to experiment with the location.
Yishai