I have some web services that I am writing and I am trying to be as RESTful as possible. I am hosting these web services using a HTTPHandler running inside of IIS/ASP.NET/SharePoint.
Most of my services expect a HTTP GET. I have two of these that are simply returning some data (i.e., a query) and will be Idempotent, but the parameters...
How can I update a WCF REST services UriTemplate to be www.mysite.com/... instead of the system name http://mysystem/...
When I go to the service help page I see the system name and I don't want the end user to see that.
http://myServerName.local/WCF/Svc.svc/blah/function
I want to see
http://www.mysite.com/WCF/Svc.svc/blah/fu...
Here is the scenario, I have a WCF service call that takes one string parameter and that string has slashes in it (e.g. "123/456.xml"). I want to setup a UriTemplate like this "/{file}" so that I can access the method at http://www.example.com/File.svc/123/456.xml rather than http://www.example.com/File.svc/GetFile?file=123/456.xml.
Is...
I have trying to design a REST service in .NET 3.5 with WCF REST Contrib. My service is nearly working fine, but I am facing a bizarre error.
Basically, I have two methods:
[WebInvoke(UriTemplate = "/books?id={identity}", Method = "PUT")]
public string InsertBook(string identity, Book book)
{
// snipped
}
and
[WebInvoke(UriTemplate...
I'm developing some RESTful services in WCF 4.0. I've got a method as below:
[OperationContract]
[WebGet(UriTemplate = "Test?format=XML&records={records}", ResponseFormat=WebMessageFormat.Xml)]
public string TestXml(string records)
{
return "Hello XML";
}
So if i navigate my browser to http://localhost:8000/Ser...
Hi,
I have a webservice to give access to some resources on a network. The service has a method to look for the resource and returns the path of the resource. Another method, send to request to the webservice with this path. I try to pass the entire UNC path (encoded with HttpServerUtlility.UrlTokenEncode method) to the webservice. The ...
I have a WCF service with this declared operation:
[WebGet(UriTemplate = "Test/{*testString}")]
public String Test(String testString)
{
return testString;
}
However when attempting to invoke the URL Test/You%26Me, IIS returns an error:
A potentially dangerous Request.Path value was detected from the client (&).
My goal is to al...
I am using the Spring RestTemplate to make calls to a Apache Solr index. I form a request string manually and don't supply any intentional {variable_name} template expansion variables. Part of the query is the term {!lucene q.op=OR}. Unfortunately this gets processed by the URITemplate engine as part of a restTemplate.getForObject call. ...
[OperationContract]
[WebGet(UriTemplate = "/searchresults/{searchTerm}/{searchType}", ResponseFormat = WebMessageFormat.Xml, RequestFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
Message GetSearchResults(string searchTerm, string searchType);
[OperationContract]
[WebGet(UriTemplate = "/sear...
Here is a trivial example that is supposed to return "Hello World" string. However, a browser displays something like SGVsbG8gV29ybGQ=. Which is the right way to return plain text from an oldskul-style service?
please know that:
I can't return a string: three Unicode characters will be automatically prepended and the legacy HTTP clien...
WCF will match this:
http://localhost:8888/test/blahFirst/blahSecond/sdfsdf,wwewe
to this:
[OperationContract]
[WebGet( UriTemplate = "test/{first}/{second}/{val1},{val2}" )]
string GetVal( string first, string second, string val1, string val2 );
Is there a way to make the va11, val2 be a variable length list of parameters? So it co...