我有這樣的webservicedefinition:WCF WebInvoke問題越來越WSDL
[OperationContract]
[FaultContract(typeof(Exception))]
[WebInvoke(ResponseFormat = WebMessageFormat.Xml,
BodyStyle = WebMessageBodyStyle.Wrapped,
RequestFormat = WebMessageFormat.Xml)]
SearchResponse SearchXML(SearchRequest req);
和服務的配置是這樣的:
<service name="SearchEngine.SearchService" behaviorConfiguration="HTTPGetBehavior">
<endpoint address="SearchEngine.SearchService" behaviorConfiguration="ajaxBehavior" binding="webHttpBinding" contract="SearchEngine.ISearchInterface" />
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8800/SearchService" />
</baseAddresses>
</host>
</service>
,我想獲得的WSDL文件,這應該是可能的像這樣的HTTP-GET請求:
http://localhost:8800/SearchService?wsdl
但是,所有iam獲得的是「wcf服務的方法不允許的消息」
我在做什麼錯了?我希望WSDL信息顯示的請求和響應外部客戶端結構(這樣他可以準備自己的函數調用)
感謝
看看我的新ANSW呃 - 它解決了你的問題嗎? WebHttpBinding(REST)沒有WSDL - 只有在執行SOAP調用時纔可用 – 2009-08-30 08:48:41