急,webservice 高手请帮忙解决下看下大概是那些原因
我用eclipse,new web service client -根据已有的wsdl自动获得客户端代码时老是报错!如下:(弹出error窗口)
IWAB0399E Error in generating Java from WSDL: java.io.IOException: ERROR: Missing <soap:fault> element inFault "Exception" in operation "Exception", in binding setFinOrg
java.io.IOException: ERROR: Missing <soap:fault> element inFault "Exception" in operation "Exception", in binding setFinOrg
at org.apache.axis.wsdl.symbolTable.SymbolTable.faultsFromSOAPFault(SymbolTable.java:2858)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2549)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:744)
at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)
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(Thread.java:619)
下面是我的wsdl文件
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://ws.apache.org/axis2" xmlns:ax213="http://types.sms.semir.evangelsoft.com/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://ws.apache.org/axis2">
<wsdl:types>
<xs:schema xmlns:ax214="http://types.sms.semir.evangelsoft.com/xsd" attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://ws.apache.org/axis2">
<xs:import namespace="http://types.sms.semir.evangelsoft.com/xsd"/>
<xs:complexType name="Exception">
<xs:sequence>
<xs:element minOccurs="0" name="Exception" nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
<xs:element name="Exception">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="Exception" nillable="true" type="ns:Exception"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="setFinOrg">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="args0" nillable="true" type="ax213:FinanceOrg"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="setFinOrgResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<xs:schema attributeFormDefault="qualified" elementFormDefault="unqualified" targetNamespace="http://types.sms.semir.evangelsoft.com/xsd">
<xs:complexType name="FinanceOrg">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="item" nillable="true" type="ax213:FinanceOrgItem"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FinanceOrgItem">
<xs:sequence>
<xs:element minOccurs="0" name="baNum" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="bankAcName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="bankAcNum" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="bankCode" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="bankName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="brand" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="dtlRemarks" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="entityName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="entityNum" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="finOrgName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="finOrgNum" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="finOrgTtl" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="remarks" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="setFinOrgRequest">
<wsdl:part name="parameters" element="ns:setFinOrg"/>
</wsdl:message>
<wsdl:message name="setFinOrgResponse">
<wsdl:part name="parameters" element="ns:setFinOrgResponse"/>
</wsdl:message>
<wsdl:message name="Exception">
<wsdl:part name="parameters" element="ns:Exception"/>
</wsdl:message>
<wsdl:portType name="FinOrgSvcPortType">
<wsdl:operation name="setFinOrg">
<wsdl:input message="ns:setFinOrgRequest" wsaw:Action="urn:setFinOrg"/>
<wsdl:output message="ns:setFinOrgResponse" wsaw:Action="urn:setFinOrgResponse"/>
<wsdl:fault message="ns:Exception" name="Exception" wsaw:Action="urn:setFinOrgException"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="FinOrgSvcSoap11Binding" type="ns:FinOrgSvcPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="setFinOrg">
<soap:operation soapAction="urn:setFinOrg" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="Exception">
<soap:fault use="literal" name="Exception"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="FinOrgSvcSoap12Binding" type="ns:FinOrgSvcPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="setFinOrg">
<soap12:operation soapAction="urn:setFinOrg" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="Exception">
<soap12:fault use="literal" name="Exception"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="FinOrgSvcHttpBinding" type="ns:FinOrgSvcPortType">
<http:binding verb="POST"/>
<wsdl:operation name="setFinOrg">
<http:operation location="FinOrgSvc/setFinOrg"/>
<wsdl:input>
<mime:content type="text/xml" part="setFinOrg"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="setFinOrg"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="FinOrgSvc">
<wsdl:port name="FinOrgSvcHttpSoap11Endpoint" binding="ns:FinOrgSvcSoap11Binding">
<soap:address location="http://10.90.104.47:8080/axis2/services/FinOrgSvc.FinOrgSvcHttpSoap11Endpoint/"/>
</wsdl:port>
<wsdl:port name="FinOrgSvcHttpSoap12Endpoint" binding="ns:FinOrgSvcSoap12Binding">
<soap12:address location="http://10.90.104.47:8080/axis2/services/FinOrgSvc.FinOrgSvcHttpSoap12Endpoint/"/>
</wsdl:port>
<wsdl:port name="FinOrgSvcHttpEndpoint" binding="ns:FinOrgSvcHttpBinding">
<http:address location="http://10.90.104.47:8080/axis2/services/FinOrgSvc.FinOrgSvcHttpEndpoint/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
--------------------编程问答-------------------- 帮顶下。 --------------------编程问答-------------------- 错误信息提示:缺少元素<soap:fault>
但在配置文件中已经有 <soap:fault use="literal" name="Exception"/>
估计是缺少相关的Jar包没有导入 --------------------编程问答-------------------- eclipse这东西好使么?没用过,用webservice包里的命令生成客户端代码试试,看看报啥错 --------------------编程问答-------------------- 我也遇到同样的问题,等待高手答复 --------------------编程问答-------------------- axis包版本是否一致?
补充:Java , Java EE