views:

315

answers:

2

I need to create a web service that a PHP client can call. The service needs to accept 1 or many integers, provide security, and does not need to return any data (though other similar services may need to). This particular service will is intended to trigger a data extract that will be picked up later.

My manager believes that creating RESTful services is the best route to pursue, but I have no experience with those.

  1. What is the recommended approach to take here?

  2. If REST is the correct approach, are there any good examples, books, walk through, or tutorials available that are not videos?

One last note, what I use now will set a precedent for migrating our products backend logic from PHP to .net.

+1  A: 

I believe that in case of PHP calling .NET web service RESTful web service is the way to go. WCF has a nice starter kit "that enable users to create REST style services using WCF". If you don't want to go the WCF route, a plain IHttpHandler plus System.Web.Routing from .NET 3.5 (IIRC) will do.

As far as theoretical side is concerned, get a copy of RESTful Web Services. It' well worth it.

Anton Gogolev
A: 

This is more of a .NET question really, than a php one. PHP can easily integrate with any of the major styles of web services; xml-rpc, soap and http-based (rest). The problem with the latter is that it's loosely defined. This is fine from one perspective, but takes a bit more effort (I don't know how easy it is to set up in .NET). If you want something that works, with minimal effort, I would say that xml-rpc is an often overlooked middle ground between the heavy-weight soap and the flexible rest. From a php-perspective, it's much nicer to use than soap.

troelskn