Hi, I have a WCF RESTFul service declared thus:
[ServiceContract]
public interface IGasPriceService
{
[OperationContract]
[WebGet
(ResponseFormat = WebMessageFormat.Xml,
BodyStyle = WebMessageBodyStyle.Bare,
UriTemplate = "/GetGasPrice/For/ZipCode/{zipCode}"
)]
GasPriceData GetPriceData(string zipCode);
[OperationContract]
[WebGet
(RequestFormat = WebMessageFormat.Xml,
ResponseFormat = WebMessageFormat.Xml,
BodyStyle = WebMessageBodyStyle.Bare,
UriTemplate = "/GetGasPrice/For/City/{city}"
)]
GasPriceData GetPriceDataForCity(string city);
[OperationContract]
[WebInvoke
(Method = "POST",
RequestFormat = WebMessageFormat.Xml,
UriTemplate = "/SetGasPrice/For/ZipCode/{zipCode}/Price/{price}"
)]
void SetPriceDataForZipCode(string zipCode, string price);
}
The methods GetPriceData and GetPriceDataforCity work, but the SetPriceDataForZipCode does not work. Can any one let me know why this dows not work.
When I issue a request like:
http://localhost:7002/SetGasPrice/For/ZipCode/45678/7.80
the message that I get is: EndPoint Not Found
Any ideas how to fix this?
thanks,
Arun