I’m using Grails (2.1.0) and CXF plugin (0.9.0) to generate a web service endpoint and my wsdl is being generated with the package name as the targetNamespace.
According this tutorial I should annotate my class with @WebService and use targetNamespace property to make it as my needs but didn’t work.
Even with the annotation in the service class (not using interface) my generated wsdl first line is:
<wsdl:definitions name="ServiceName" targetNamespace="http://com.packageName/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://com.packageName/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
What should I do for a correct targetNamespace?
The various
@Web*annotations are only read if you usein your service. If you’re using
expose = ['cxf']you’ll need to change tocxfjax.