她有//路径/ a / wsdl文件,我正在尝试生成webservices客户端程序,但是当我们添加文件时,它显示以下错误
示例wsdl: wsdl:definitions targetNamespace =“http://xyz.com/” xmlns:tns =“http://xyz.com/”xmlns:cmn =“http://xyz.com/Common/” xmlns:wsdl =“http://schemas.xmlsoap.org/wsdl/”xmlns:xsd =“http://www.w3.org/2001/XMLSchema” xmlns:soap =“http://schemas.xmlsoap.org/wsdl/soap/”xmlns:soap12 =“http://schemas.xmlsoap.org/wsdl/soap12/” 的xmlns:xmime = “http://www.w3.org/2005/05/xmlmime” >
<s:element name="GetPublisherRevenueCSV">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="name" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="pwd" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="operatorId" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="criteria" type="tns:PublisherRevenueCriteria" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetPublisherRevenueCSVResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" name="CSVFile" type="tns:CSVFile" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="CSVFile">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="File" type="s:hexBinary"
xmime:expectedContentTypes="text/plain" />
</s:sequence>
</s:complexType>
<s:complexType name="PublisherRevenueCriteria">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="publisherId" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="adSpaceId" type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="startDate" type="s:date" />
<s:element minOccurs="1" maxOccurs="1" name="endDate" type="s:date" />
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="GetPublisherRevenueCSVSoapIn">
<wsdl:part name="parameters" element="tns:GetPublisherRevenueCSV" />
</wsdl:message>
<wsdl:message name="GetPublisherRevenueCSVSoapOut">
<wsdl:part name="parameters" element="tns:GetPublisherRevenueCSVResponse" />
</wsdl:message>
<wsdl:operation name="GetPublisherRevenueCSV">
<wsdl:input message="tns:GetPublisherRevenueCSVSoapIn" />
<wsdl:output message="tns:GetPublisherRevenueCSVSoapOut" />
<wsdl:fault name="CMS_API_Exception" message="cmn:CMS_API_Exception" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PublisherRevenueWSSoap" type="tns:PublisherRevenueWSSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetPublisherRevenueCSV">
<soap:operation soapAction="http://xyz.com/GetPublisherRevenueCSV"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
<wsdl:fault name="CMS_API_Exception">
<soap:fault name="CMS_API_Exception" use="literal" />
</wsdl:fault>
</wsdl:operation>
错误: IWAB0399E从WSDL生成Java时出错:java.io.IOException:错误:绑定GetPublisherRevenueCSV时操作“CMS_API_Exception”中缺少元素inFault“CMS_API_Exception” java.io.IOException:错误:绑定GetPublisherRevenueCSV时操作“CMS_API_Exception”中缺少元素inFault“CMS_API_Exception” 在org.apache.axis.wsdl.symbolTable.SymbolTable.faultsFromSOAPFault(SymbolTable.java:2858) 在org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2549) 在org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:744) 在org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543) 在org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518) 在org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495) 在org.apache.axis.wsdl.gen.Parser $ WSDLRunnable.run(Parser.java:361) 在java.lang.Thread.run(Thread.java:722)
答案 0 :(得分:6)
我有类似的问题,,, 改变
它可以工作。
<wsdl:fault name="CMS_API_Exception">
<soap:fault name="CMS_API_Exception" use="literal" />
到
<soap:fault name="CMS_API_Exception">
<soap:fault name="CMS_API_Exception" use="literal" />
</soap:fault>