SoapUI 5.2无法在轴1.X WSDL2JAVA中生成代码

时间:2016-08-26 14:36:11

标签: java xml soapui axis

我在尝试从SoapUI 5.2生成代码时遇到问题。

这是XML

POST http://THEIP/hafServer.php HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:hafwsdl#getToken"
Content-Length: 587
Host: THEIP
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:hafwsdl">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:getToken soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <rif xsi:type="xsd:string">J000928630</rif>
         <numero_cuenta xsi:type="xsd:string">1003236751</numero_cuenta>
         <ip_cliente xsi:type="xsd:string">127.0.0.1</ip_cliente>
      </urn:getToken>
   </soapenv:Body>
</soapenv:Envelope>

这是错误

java.io.IOException: Type {http://www.w3.org/2001/XMLSchema}Array is referenced but not defined.
    at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
    at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
    at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
    at java.lang.Thread.run(Unknown Source)

我做错了什么?

编辑,这是wsdl

<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:haf" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:haf">
<types>
<xsd:schema targetNamespace="urn:haf">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/>
<xsd:complexType name="userInfo">
<xsd:sequence>
<xsd:element name="code_result" type="xsd:integer"/>
<xsd:element name="descripcion" type="xsd:string"/>
<xsd:element name="datos" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<message name="getTokenRequest">
<part name="rif" type="xsd:string"/>
<part name="numero_cuenta" type="xsd:string"/>
<part name="ip_cliente" type="xsd:string"/>
</message>
<message name="getTokenResponse">
<part name="return" type="tns:userInfo"/>
</message>
<portType name="hafPortType">
<operation name="getToken">
<documentation>
RETORNA ARREGLO CON TOKEN DE AUTENTICACION code_result 0: ERROR CON LA BASE DE DATOS 1: TOKEN RETORNADO EXITOSAMENTE 2: RIF y NUMERO DE CUENTA NO EXISTEN EN LA BASE DE DATOS
</documentation>
<input message="tns:getTokenRequest"/>
<output message="tns:getTokenResponse"/>
</operation>
</portType>
<binding name="hafBinding" type="tns:hafPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getToken">
<soap:operation soapAction="urn:hafwsdl#getToken" style="rpc"/>
<input>
<soap:body use="encoded" namespace="urn:hafwsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output>
<soap:body use="encoded" namespace="urn:hafwsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="haf">
<port name="hafPort" binding="tns:hafBinding">
<soap:address location="http://THEIP/hafServer.php"/>
</port>
</service>
</definitions>

这是我想用来生成java代码的WSDL。

0 个答案:

没有答案