开发者社区> 问答> 正文

CXF生成webservices客户端报错?报错

如题,生成客户端时报图片里的错误。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>



展开
收起
爱吃鱼的程序员 2020-06-09 15:31:24 683 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    用工具生成一下试试<atarget='_blank'>@ggg1<arel='nofollow'target='_blank'>http://blog.sina.com.cn/s/blog_7003af290101gykd.html<atarget='_blank'>@ggg1<arel='nofollow'target='_blank'>http://blog.sina.com.cn/s/blog_60fcb5a10100tlap.html什么工具?

    2020-06-09 15:31:42
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
WEB SERVICE EFFICENCY 立即下载
SPARKLER,A web-crawler on Apache Spark 立即下载
低代码开发师(初级)实战教程 立即下载