Can any one please let me know what is the method to generate WSDL in Apache CXF
Server using original WSDL.
I know Axis 2
has a configurat
For using the original WSDL to generate WSDL in CXF Server we can use the attribute wsdlLocation
in the element jaxws:endpoint
The attribute ,Specifies the location of the endpoint's WSDL contract. The WSDL contract's location is relative to the folder from which the service is deployed.
OR
in CXF we can use @WebService
annotation we can specify the WSDL location Please refer the documentation
about @WebService
I myself found the answer, I think this is a simple question, but felt that this answer can be in stackoverflow
EDIT:
Eventhough I added wsdlLocation
, the service could not be created by CXF framework. Errors in apache tomcat are not that helpful, except stating that Service could not be created.
For proper working jaxws:endpoint
should have following attributes:
wsdlLocation
- relative path from the project folder e.g /WEB-INF/originalwsdl.wsdl
serviceName
- service name in the WSDL, with namespace specified in wsdl e.g e:ServiceName
endpointName
- this is the port binding name, same rules as serviceName e.g e1:endpointName
Remember to define the namespaces for e: and e1 by xmlns:e="namespace as in your wsdl"
After all this setting my application worked. The classes we create from wsdl should have the same package name as target name space, for creating exactly same WSDL using original WSDL. Please someone confirm this finding.
I found that there is very little documentation for CXF, and had to dig in the code and xsds for my solutions