rest

HOWTO: Write Python API wrapper?

I'd like to write a python library to wrap a REST-style API offered by a particular Web service. Does anyone know of any good learning resources for such work, preferably aimed at intermediate Python programmers? I'd like a good article on the subject, but I'd settle for nice, clear code examples. CLARIFICATION: What I'm looking to do ...

Keeping a DCOM object alive from Java server on a REST invocation

Hi, I'm implementing a REST API for my Java server. One of the of the resources obtained through the API is actually creating a C++ DCOM object and reflecting its values. The Java to COM bridge I'm using is J-Integra. The problem is that I need to keep that DCOM object alive for subsequent REST calls, but the object is alive just as lo...

How do you send a request with the "DELETE" HTTP verb?

I'd like to create a link in a view within a Rails application that does this... DELETE /sessions How would I do that. Added complication: The "session" resource has no model because it represents a user login session. CREATE means the user logs in, DESTROY means logs out. That's why there's no ID param in the URI. I'm trying to i...

What is the difference between "Web Services" and "web services"?

I consider there to be a distinct difference between "Web Services" and "web services" and find myself referring to the latter as "lower case web services". I'd loosely list the differences as: "Web Services" most conforming to the W3C definition based around the WS-* stack enterprise-level mature and dependable strong focus on indu...

Is it possible to read request headers from WCF IDataContractSurrogate implementation?

I have a RESTful service that I am developing in WCF. I am exposing a contract that does not have serializable types so I am using a DataContractSurrogate (implementation of IDataContractSurrogate) to create surrogates that can be serialized with the DataContractSerializer. My question is, how can I access request/response headers in m...

WCF REST Starter Kit - support for multiple resources?

I just started tinkering with the WCF REST Starter Kit, I watched the screencasts and... I suspect I'm just being stupid. :) Out of the box (with the provided templates) I can create REST services for a singleton resource or a collection of a resource. But what about support for different kinds of resources in the same project? In exampl...

C# webservice needs to convert SOAP to REST on the fly.

I am trying to write a translation layer for a test system for which I am writing software. I am using LabVIEW for the test system and that uses a RESTful webservice. I have implemented the REST Methods and they are working OK. The remote Test controller and data service layer etc are written in C# and SQL and these are the items I have ...

What are your favorite resources concerning RESTful WCF?

Please let me know your favorite books, blogs, articles etc about RESTful WCF. I know how to Google - what I'm really looking for are sites, books, etc that you have personally used and gained something useful from. Thanks! ...

Why does my WCF service not respond my baseAddress setting in web.config?

I'm trying to learn how to build RESTful services with WCF by recreating the project on this blog post by Anthony Steele. He uses the following XML in his config to setup the endpoint for the service. <host> <baseAddresses> <add baseAddress="http://localhost:8080/greeter"/&gt; </baseAddresses> </host> Howev...

Problem calling rest service

I'm calling.a rest service (the task service sample from the rest starter kit) using a channel factory by using this code: WebChannelFactory factory = new WebChannelFactory(new WebHttpBinding(), new Uri(http://localhost:61825/Service.svc)); TasksService.IService proxy = factory.CreateChannel(); var i = proxy.GetTasks("Dimitri"); works...

Why is this WCF service not recognizing the UriTemplate parameter?

I've created the following RESTful WCF service, which works just fine when running it in VS. [OperationContract] [WebGet(ResponseFormat = WebMessageFormat.Json, UriTemplate = "/sales/start={start}&end={end}")] List<Sales> GetSalesByDate(string start, string end); However, when deploying this to my test server (running Win2K3 and...

Can you help me understand this? "Common REST Mistakes: Sessions are irrelevant"

Disclaimer: I'm new to the REST school of thought, and I'm trying to wrap my mind around it. So, I'm reading this page, Common REST Mistakes, and I've found I'm completely baffled by the section on sessions being irrelevant. This is what the page says: "There should be no need for a client to "login" or "start a connection." HTTP authe...

Licenses and sessions the RESTful way

This question crossed my mind after I read this post: “Common REST Mistakes: Sessions are irrelevant” If sessions are indeed discouraged in a RESTful application. How would you handle licenses in such application. I'm specifically referring to concurrent licenses model and not named licenses. i.e. the customer buys X licenses which mea...

Can I pass non-string to WCF RESTful service using UriTemplate?

Can I do the following? [OperationContract] [WebGet(UriTemplate = "/foo/{id}")] string GetFoo(int id); I'd like my service to function as both RESTful service and RPC-style SOAP service. If possible I'd like to retain int as int, and not do parsing by hand. ...

Should I even bother supporting anything but RESTful HTTP?

I'm developing a WCF-based API for my company's CRM software. In the future, it will be used to develop applications on multiple platforms. I know WCF provides named pipe, TCP, and HTTP transports, but should I bother with the complexity of supporting all three when everything seems to be using RESTful HTTP these days? ...

What are some ways to control a device through an IP address?

I want to get some ideas on how I might control a video camera through an IP address. I have an API to control pan and tilt from a local machine. The code is going to be in C/C++ on Windows. I am still designing if I want multiple cameras controlled from one application or have a one camera to one application. Would SOA be a useful a...

Can you explain the Web concept of RESTful?

Looking for clear and concise explanations of this concept. ...

Easy breadcrumbs for RESTful rails application

Is there any helper method (Other than default rails breadcrumb) that generates bread crumb navigation dynamically for a particular page without having to pass trivial parameters in RESTful application? That is, something that figures out automatically where the user is based on the REST url she is visiting? For above mentioned implemen...

What is the best / most flexible way to have WCF output XHTML?

What is the best / most flexible way to have WCF output XHTML? If there is no "WCF Way" (tm) to do XHTML output - is there any common tooling out there for it? Or do I need to roll my own? ...

Consuming a REST Service with SAS

This is sort of an odd question. I know that SAS has a PROC SOAP for consuming web services. I wonder if anyone has any experience consuming XML from a REST resource using SAS? ...