我有这样的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