Hi, does a service, which is configured like in the box below, throwing a 404 when there is a mismatch in the parameter? In this case the parameter is a complex type and every call to the SearchJson method returns a 404... ( is it even allowed with the WebInvoke option and WITHOUT the UriTemplate? )
The service is up and running ( i can call the Testpage with the "Generate your client ..?wsdl"-stuff )
The service method is configured as:
[OperationContract]
[FaultContract(typeof(Exception))]
[WebInvoke(ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest,
RequestFormat = WebMessageFormat.Json)]
SearchResponse SearchJson(SearchRequest req);
Any ideas how to solve this?
btw. this is what i use for testing... no matter what parameter i change, a 404 is returned... i can only trigger a different behavior when i change the WebInvoke to WebGet and use a simple-type as parameter ( like string )... then i get a 405
WebRequest req = HttpWebRequest.Create("http://localhost:8800/SearchService/SearchJson");
req.Method = "POST";
req.ContentType = "application/json";
req.ContentLength = 354;
WebResponse resp = req.GetResponse();
Here is the the config:
<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>