CXF生成webservices客户端报错

发布于 2021-11-26 21:37:31 字数 12227 浏览 846 评论 4

如题,生成客户端时报图片里的错误。The part does not have a type defined. Every part must specify a type from some type system. The type can be specified using the built in element or type attributes or may be specified using an extension attribute.

-----------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns="http://TjEmsMailQuery.org/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://TjEmsMailQuery.org/">
    <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://TjEmsMailQuery.org/">
            <s:element name="GetMailInfo">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="sVipCode" type="s:string"/>
                        <s:element minOccurs="0" maxOccurs="1" name="sMailNo" type="s:string"/>
                        <s:element minOccurs="0" maxOccurs="1" name="sSecretText" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetMailInfoResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="GetMailInfoResult" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetMailInfoXML">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="sVipCode" type="s:string"/>
                        <s:element minOccurs="0" maxOccurs="1" name="sMailNo" type="s:string"/>
                        <s:element minOccurs="0" maxOccurs="1" name="sSecretText" type="s:string"/>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="GetMailInfoXMLResponse">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" name="GetMailInfoXMLResult">
                            <s:complexType mixed="true">
                                <s:sequence>
                                    <s:any/>
                                </s:sequence>
                            </s:complexType>
                        </s:element>
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="string" nillable="true" type="s:string"/>
        </s:schema>
    </wsdl:types>
    <wsdl:message name="GetMailInfoSoapIn">
        <wsdl:part name="parameters" element="tns:GetMailInfo"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoSoapOut">
        <wsdl:part name="parameters" element="tns:GetMailInfoResponse"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoXMLSoapIn">
        <wsdl:part name="parameters" element="tns:GetMailInfoXML"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoXMLSoapOut">
        <wsdl:part name="parameters" element="tns:GetMailInfoXMLResponse"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoHttpGetIn">
        <wsdl:part name="sVipCode" type="s:string"/>
        <wsdl:part name="sMailNo" type="s:string"/>
        <wsdl:part name="sSecretText" type="s:string"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoHttpGetOut">
        <wsdl:part name="Body" element="tns:string"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoXMLHttpGetIn">
        <wsdl:part name="sVipCode" type="s:string"/>
        <wsdl:part name="sMailNo" type="s:string"/>
        <wsdl:part name="sSecretText" type="s:string"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoXMLHttpGetOut">
        <wsdl:part name="Body"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoHttpPostIn">
        <wsdl:part name="sVipCode" type="s:string"/>
        <wsdl:part name="sMailNo" type="s:string"/>
        <wsdl:part name="sSecretText" type="s:string"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoHttpPostOut">
        <wsdl:part name="Body" element="tns:string"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoXMLHttpPostIn">
        <wsdl:part name="sVipCode" type="s:string"/>
        <wsdl:part name="sMailNo" type="s:string"/>
        <wsdl:part name="sSecretText" type="s:string"/>
    </wsdl:message>
    <wsdl:message name="GetMailInfoXMLHttpPostOut">
        <wsdl:part name="Body"/>
    </wsdl:message>
    <wsdl:portType name="TjEmsMailQuerySoap">
        <wsdl:operation name="GetMailInfo">
            <wsdl:input message="tns:GetMailInfoSoapIn"/>
            <wsdl:output message="tns:GetMailInfoSoapOut"/>
        </wsdl:operation>
        <wsdl:operation name="GetMailInfoXML">
            <wsdl:input message="tns:GetMailInfoXMLSoapIn"/>
            <wsdl:output message="tns:GetMailInfoXMLSoapOut"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:portType name="TjEmsMailQueryHttpGet">
        <wsdl:operation name="GetMailInfo">
            <wsdl:input message="tns:GetMailInfoHttpGetIn"/>
            <wsdl:output message="tns:GetMailInfoHttpGetOut"/>
        </wsdl:operation>
        <wsdl:operation name="GetMailInfoXML">
            <wsdl:input message="tns:GetMailInfoXMLHttpGetIn"/>
            <wsdl:output message="tns:GetMailInfoXMLHttpGetOut"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:portType name="TjEmsMailQueryHttpPost">
        <wsdl:operation name="GetMailInfo">
            <wsdl:input message="tns:GetMailInfoHttpPostIn"/>
            <wsdl:output message="tns:GetMailInfoHttpPostOut"/>
        </wsdl:operation>
        <wsdl:operation name="GetMailInfoXML">
            <wsdl:input message="tns:GetMailInfoXMLHttpPostIn"/>
            <wsdl:output message="tns:GetMailInfoXMLHttpPostOut"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="TjEmsMailQuerySoap" type="tns:TjEmsMailQuerySoap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="GetMailInfo">
            <soap:operation soapAction="http://TjEmsMailQuery.org/GetMailInfo" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetMailInfoXML">
            <soap:operation soapAction="http://TjEmsMailQuery.org/GetMailInfoXML" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="TjEmsMailQuerySoap12" type="tns:TjEmsMailQuerySoap">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="GetMailInfo">
            <soap12:operation soapAction="http://TjEmsMailQuery.org/GetMailInfo" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetMailInfoXML">
            <soap12:operation soapAction="http://TjEmsMailQuery.org/GetMailInfoXML" style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="TjEmsMailQueryHttpGet" type="tns:TjEmsMailQueryHttpGet">
        <http:binding verb="GET"/>
        <wsdl:operation name="GetMailInfo">
            <http:operation location="/GetMailInfo"/>
            <wsdl:input>
                <http:urlEncoded/>
            </wsdl:input>
            <wsdl:output>
                <mime:mimeXml part="Body"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetMailInfoXML">
            <http:operation location="/GetMailInfoXML"/>
            <wsdl:input>
                <http:urlEncoded/>
            </wsdl:input>
            <wsdl:output>
                <mime:content part="Body" type="text/xml"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="TjEmsMailQueryHttpPost" type="tns:TjEmsMailQueryHttpPost">
        <http:binding verb="POST"/>
        <wsdl:operation name="GetMailInfo">
            <http:operation location="/GetMailInfo"/>
            <wsdl:input>
                <mime:content type="application/x-www-form-urlencoded"/>
            </wsdl:input>
            <wsdl:output>
                <mime:mimeXml part="Body"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetMailInfoXML">
            <http:operation location="/GetMailInfoXML"/>
            <wsdl:input>
                <mime:content type="application/x-www-form-urlencoded"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content part="Body" type="text/xml"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="TjEmsMailQuery">
        <wsdl:port name="TjEmsMailQuerySoap" binding="tns:TjEmsMailQuerySoap">
            <soap:address location="http://111.30.74.35:8081/TjEmsMailQuery/MailQueryService.asmx"/>
        </wsdl:port>
        <wsdl:port name="TjEmsMailQuerySoap12" binding="tns:TjEmsMailQuerySoap12">
            <soap12:address location="http://111.30.74.35:8081/TjEmsMailQuery/MailQueryService.asmx"/>
        </wsdl:port>
        <wsdl:port name="TjEmsMailQueryHttpGet" binding="tns:TjEmsMailQueryHttpGet">
            <http:address location="http://111.30.74.35:8081/TjEmsMailQuery/MailQueryService.asmx"/>
        </wsdl:port>
        <wsdl:port name="TjEmsMailQueryHttpPost" binding="tns:TjEmsMailQueryHttpPost">
            <http:address location="http://111.30.74.35:8081/TjEmsMailQuery/MailQueryService.asmx"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>



如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文