Generate wsdl file and webservice client based on wsdl file in maven

I am working on a project where I have a webservice module and a web module. I want the client to be created based on the wsdl file of the web service, and I want the wsdl file to be generated when the webservice module is created.

I found maven plugins for this (axis2-java2wsdl-maven-plugin and axis2-wsdl2code-maven-plugin), but the axis2-java2wsdl-maven plugin continues to generate invalid xsd for the wsdl file (I think it is at least invalid).

Webservice returns some enumerations from its methods or returns objects containing enumerations. When creating a wsdl file, I get a link to "xs: Enum", which does not exist in this namespace for the two enumeration types. I have several, but only two of them get this base = "xs: Enum".

<xs:complexType name="LoginType"> <xs:complexContent> <xs:extension base="xs:Enum"> <xs:sequence/> </xs:extension> </xs:complexContent> </xs:complexType> 

Therefore, when creating the client module using the axis2-wsdl2code-maven plugin, I get the following error:

 error: src-resolve: type ' Enum@http ://www.w3.org/2001/XMLSchema' not found. 

I do not understand why it continues to generate invalid XSD!

+4
source share
1 answer

This has been a known issue for a very long time. This is one of the reasons I started using Apache CXF instead of Axis. It even looks like Maven Plugin .

+2
source

All Articles