I'm using CXF with the @WebService
annotation. It generates the WSDL file as one big file, is there a way I can tell it to generate the wsdl:types
externally in an XSD file and import them into the WSDL?
xsd using following steps : Create library (optional) > Right Click , New Message Model File > Select SOAP XML > Choose Option 'I already have WSDL for my data' > 'Select file outside workspace' > 'Select the WSDL bindings to Import' (if there are multiple) > Finish. This will give you the . xsd and .
CXF includes a Maven plugin which can generate java artifacts from WSDL. Here is a simple example: < plugin > < groupId >org.apache.cxf</ groupId > < artifactId >cxf-codegen-plugin</ artifactId >
Most WSDL documents either include an XSD document, or they reference an XSD document located somewhere else. So WSDL and XSD are closely related. You will often see XSD being used to describe the input and output messages of a web service.
Procedure. In the diagram editor, right-click the WSDL file; then click Add WSDL > Import XSD file. In the Select window, follow the instructions and complete the pages. Click OK.
1) Your best option is use CXF's JavaToWS
, just provide your implementation class and domain objects with "-createxsdimports"
option, it will create separate WSDL and XSD files for you,
see below example from my website
http://www.javatips.net/blog/2012/09/cxf-java2wsdl-example
2) You can use SOPERA suite http://www.sopera.de/en/downloads/sopera-asf-331 and it converts into separate WSDL and XSD
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With