Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get CXF to generate external XSD for the WSDL?

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?

like image 229
Rocky Pulley Avatar asked Feb 26 '13 16:02

Rocky Pulley


People also ask

How do I get XSD for 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 .

What is CXF in WSDL?

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 >

Does WSDL contain XSD?

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.

How import XSD file to WSDL?

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 Answers

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

like image 73
java specialist Avatar answered Oct 04 '22 21:10

java specialist