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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
什么工具?
@ggg1
http://blog.sina.com.cn/s/blog_60fcb5a10100tlap.html
@ggg1
http://blog.sina.com.cn/s/blog_7003af290101gykd.html
用工具生成 一下试试