将wsdl文件制作成java时缺少"soap:fault"元素异常

use*_*396 -3 java axis soap web-services

她有//路径/ 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>
Run Code Online (Sandbox Code Playgroud)

    <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>
Run Code Online (Sandbox Code Playgroud)

错误: IWAB0399E从WSDL生成Java时出错:java.io.IOException:错误:在操作"CMS_API_Exception"中缺少元素inFault"CMS_API_Exception",绑定GetPublisherRevenueCSV java.io.IOException:错误:操作中缺少元素inFault"CMS_API_Exception" CMS_API_Exception",在org.apache.axis.wsdl.symbolTable.SymbolTable.faultsFromSOAPFault(SymbolTable.java:2858)的org.apache.axis.wsdl.symbolTable.SymbolTable.populateBindings(SymbolTable.java:2549)中的GetPublisherRevenueCSV绑定位于org.apache.axis.wsdl.symbolTable的org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:543)上的.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:744) .symbolTable.populate(SymbolTable.java:518)org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)at org.apache.axis.wsdl.gen.Parser $ WSDLRunnable.run(Parser) .java:361)在java.lang.Thread.run(Thread.java:722)

小智 6

我有一个类似的问题,,,改变

它可以工作.

 <wsdl:fault name="CMS_API_Exception">
        <soap:fault name="CMS_API_Exception" use="literal" />
Run Code Online (Sandbox Code Playgroud)

    <soap:fault name="CMS_API_Exception">
        <soap:fault name="CMS_API_Exception" use="literal" />
    </soap:fault>  
Run Code Online (Sandbox Code Playgroud)