我的wsdl文件出现以下错误。这是说errorMesage QName为null,但这对我来说毫无意义,因为我已经对错误消息及其要使用的元素进行了细化。
错误
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for errorMessage!
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:293)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Element QName is null for errorMessage!
at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:1451)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:275)
... 2 more
Caused by: java.lang.RuntimeException: Element QName is null for errorMessage!
wsd文件的一部分。
<element name="errorMessage">
<complexType>
<all>
<element name="errorMessage" type="string"/>
</all>
</complexType>
</element>
</xsd:schema>
</types>
<message name="artistName">
<part name="body" element="app:artistName"/>
</message>
<message name="discNumber">
<part name="body" element="app:discNumber"/>
</message>
<message name="listTracks">
<part name="body" element="app:listTracks"/>
</message>
<message name="errorMessage">
<part name="body" element="app:errorMessage"/>
</message>
<portType name="musicPort">
<operation name="getComposer">
<!-- include input and output messages defined above -->
<input message="app:artistName"/>
<output message="app:listTracks"/>
<fault message="app:errorMessage"/>
</operation>
我正在跟踪一个教程,该教程告诉我以下内容是如何定义errorFault的,但是它也只是给了我完全相同的错误。
<message name="errorFault"><part name="errorPart" element="..."/></message>