我遇到的問題是,當我嘗試使用此wsdl在netbeans中創建Web服務時,netbeans說沒有定義服務。我是新手,但據我所知,有一個定義。從WSDL創建Web服務時出現問題
的WSDL是:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://discoveryinsurance.com/DicQuoteSvc/AgencyQuote.wsdl" xmlns:ns="http://discoveryinsurance.com/DicQuoteSvc/schemas/DicAcordQuoteRq.xsd" xmlns:na="http://discoveryinsurance.com/DicQuoteSvc/schemas/DicAcordQuoteRs.xsd" targetNamespace="http://discoveryinsurance.com/DicQuoteSvc/AgencyQuote.wsdl">
<wsdl:import namespace="http://discoveryinsurance.com/DicQuoteSvc/schemas/" location="DicAcordQuoteRq.xsd"/>
<wsdl:import namespace="http://discoveryinsurance.com/DicQuoteSvc/schemas/" location="DicAcordQuoteRs.xsd"/>
<wsdl:types>
<xs:schema targetNamespace="http://discoveryinsurance.com/DicQuoteSvc/schemas/" elementFormDefault="qualified"/>
</wsdl:types>
<wsdl:message name="NewMessageRequest">
<wsdl:part name="parameter" element="ns:ACORD"/>
</wsdl:message>
<wsdl:message name="NewMessageResponse">
<wsdl:part name="parameter" element="na:ACORD"/>
</wsdl:message>
<wsdl:portType name="QuotePortType">
<wsdl:operation name="RequestQuote">
<wsdl:input message="tns:NewMessageRequest"/>
<wsdl:output message="tns:NewMessageResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="QuoteBinding" type="tns:QuotePortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="RequestQuote">
<soap:operation soapAction="http://discoveryinsurance.com/DicQuoteSvc/AgencyQuote" style="rpc"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AgencyQuote">
<wsdl:port name="QuotePortType" binding="tns:QuoteBinding">
<soap:address location="http://discoveryinsurance.com/DicQuoteSvc/"/>
</wsdl:port>
</wsdl:service>
XMLSpy的說,WSDL是有效的,但是當我試圖從它創建Web服務失敗。 任何幫助,將不勝感激,甚至建設性的批評。
編輯
從條命令行,我得到使用的wsimport。
[ERROR]無效的wsdl:操作 「RequestQuote」:其rpc-文字操作,MES 鼠尾草部分必須引用架構類型聲明文件的 第16行:/ d:/項目/ DICACORD/QuoteRq2 .wsdl
這是否意味着即使兩個xsd被導入,我仍然必須在wsdl中定義類型?
更新2
用於請求 - 架構>。 Schema at pastie
加成
有誰看到什麼不對的XSD進口和/或它們是如何被使用?驗證WSDL是有效
你工作的是什麼框架。Spring使這非常簡單。 – Zoidberg 2009-12-17 19:35:38
ALSO,你的XSD在哪裏? (模式) – Zoidberg 2009-12-17 19:44:04
模式每個都超過250行。它會允許我發佈那些大嗎? – ChadNC 2009-12-17 20:18:08