SOAP 및 RESTfully를 통해 노출되는 WCF 서비스를 구축했습니다. 모든 SOAP 동작은 보급 된대로 작동합니다. GETS /두고뿐만 아니라,하지만 내 서비스 작업에 POST를 수행 할 때, 나는 다음과 같은 오류가 반환받을 :RESTful WCF 서비스가 POST 작업시 "endpoint not found"오류를 반환합니다.
"을 (를) 찾을 수 없습니다 엔드 포인트"
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);
서비스는 이런 식으로 구성되어 있습니다 : 나는 같은 엔드 포인트에 대해 다른 편안하고 작업을 할 수 있기 때문에
<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