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!
source share