SOAPとRESTfulの両方で公開されているWCFサービスを構築しました。すべてのSOAPアクションは、宣言されたとおりに動作します。 GETS/PUTSは同様に行うが、私は私のサービスでアクションにPOSTを実行しようとするとき、私は次のエラーが返されます:RESTfulなWCFサービスがPOST操作で「エンドポイントが見つかりません」というエラーを返します
「が見つかりませんエンドポイント」
IPersonEditServiceContractスニペット:
[OperationContract]
[WebInvoke(Method="POST",
UriTemplate="/persons",
RequestFormat=WebMessageFormat.Xml,
ResponseFormat=WebMessageFormat.Xml)]
SavePersonResponse SavePerson(SavePersonRequest request);
[OperationContract]
WebGet(UriTemplate = "/persons/{personId}",
ResponseFormat = WebMessageFormat.Xml,
BodyStyle = WebMessageBodyStyle.Bare,
RequestFormat = WebMessageFormat.Xml)]
Person GetClaimantById(string personId);
サービスをこのように構成されています。私は、同じエンドポイントに対して他のRESTfulな操作を行うことができますので
<behaviors>
<endpointBehaviors>
<behavior name="restBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service>
<endpoint address="" binding="basicHttpBinding"
name="DefaultEndpoint"
bindingNamespace="http://mycompany.com/ServiceContracts"
contract="IPersonEditServiceContract" />
<endpoint
address="rest" binding="webHttpBinding"
name="RESTEndpoint"
bindingNamespace="http://mycompany.com/ServiceContracts"
contract="IPersonEditServiceContract"
behaviorConfiguration="restBehavior"/>
</service>
</services>
を、私はなぜそれが半有用なエラーことを私に与え全くわからないんだけど。
アイデア?
私は同じ問題を抱えています( – Evgeny