2
Я создавал клиент веб-службы с Axis в Eclipse. но получил эту ошибку:Ошибка генерации кода оси: IWAB0399E Ошибка в генерации Java из WSDL
IWAB0399E Error in generating Java from WSDL: java.io.IOException: <input ..>, <output ..> or <fault ..> in <portType> with undefined message found. message name is '{http://schemas.xmlsoap.org/wsdl/}insertPurchaseRequest
WSDL, является:
<definitions xmlns:tns="urn:WebServices11" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" name="WebServices11" targetNamespace="urn:WebServices11">
<types>
<xsd:schema xmlns="http://www.w3.org/2000/10/XMLSchema" targetNamespace="urn:WebServices11">
<xsd:element name="insertPurchaseRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="transaction_reference_id" type="xsd:integer"/>
<xsd:element name="amount" type="xsd:float"/>
<xsd:element name="reference_number" type="xsd:string"/>
<xsd:element name="reference_number" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="insertPurchaseResponse">
<xsd:complexType>
<xsd:all>
<xsd:element name="return" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element name="selectPurchaseRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="transaction_reference_id" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="selectPurchaseResponse">
<xsd:complexType>
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType" arrayType="tns:objPurchase[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="insertPurchaseRequest">
<part name="transaction_reference_id" type="xsd:integer"/>
<part name="amount" type="xsd:float"/>
<part name="reference_number" type="xsd:string"/>
<part name="reference_number" type="xsd:string"/>
</message>
<message name="insertPurchaseResponse">
<part name="return" type="xsd:string"/>
</message>
<message name="selectPurchaseRequest">
<part name="transaction_reference_id" type="xsd:integer"/>
</message>
<message name="selectPurchaseResponse">
<part name="return" type="tns:objPurchase"/>
</message>
<portType name="WebServices11PortType">
<operation name="insertPurchase">
<documentation>Add the Purchase record</documentation>
<input message="insertPurchaseRequest"/>
<output message="insertPurchaseResponse"/>
</operation>
<operation name="selectPurchase">
<documentation>Get the Purchase record</documentation>
<input message="selectPurchaseRequest"/>
<output message="selectPurchaseResponse"/>
</operation>
</portType>
<binding name="WebServices11SoapBinding" type="tns:WebServices11PortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="insertPurchase">
<soap:operation soapAction="urn:WebServices11InsertPurchaseAction"/>
<input>
<soap:body use="encoded" namespace="urn:WebServices11" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:WebServices11" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
<operation name="selectPurchase">
<soap:operation soapAction="urn:WebServices11selectPurchaseAction"/>
<input>
<soap:body use="encoded" namespace="urn:WebServices11" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:WebServices11" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="WebServices11Service">
<port name="WebServices11Port" binding="tns:WebServices11SoapBinding">
<soap:address location="http://www.emdad-rayaneh.com/WebService/Soap_WebService_emdadpc2/purchase_server.php"/>
</port>
</service>
</definitions>
Пожалуйста, помогите!
спасибо за ваш ответ, но сервер WebService не мой, я хочу написать клиент для этого Webservice , Я использовал генератор клиента Axis и получил эту ошибку. вы считаете, что это ошибка сервера, что я получил эту ошибку? –
Может быть, но инструмент soapui может генерировать полезный клиент, я не знаю, как –
tnx, SoapUI использует Axis или Apache CXF для генерации клиента тоже –