Apache Axis 2 を使用してサービスを作成しようとしています。サービスの一部は WSDL ファイルから生成する必要があるため、org.apache.axis2.wsdl.WSDL2Java を使用してこれを行います。次の WSDL ファイルを作成しました。
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://webservice.dummy.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://webservice.dummy.com">
<types>
<schema targetNamespace="http://webservice.dummy.com" xmlns:tns="http://webservice.dummy.com" xmlns="http://www.w3.org/2000/10/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<element name="tns:BodyData">
<complexType>
<all>
<element name="price" type="xsd:float"/>
</all>
</complexType>
</element>
</schema>
</types>
<wsdl:message name="CreateResp">
<wsdl:part name="CreateResp" element="xsd:int"/>
</wsdl:message>
<wsdl:message name="CreateReq">
<wsdl:part name="CreateReq" element="tns:BodyData"/>
</wsdl:message>
</wsdl:definitions>
しかし、WSDL2Java はこのファイルの検証に失敗し、次のように表示されます。
[java] at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:293) [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) [java] 原因: org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type名前空間http://webservice.dummy.comで名前 BodyDataにマップされました.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:275) [java] ... 2 つ以上
私のwsdlファイルの何が問題なのか誰か説明できますか?