PHP web hizmetleri uygulamak için en iyi yolu nedir? Ben NuSOAP ve WSO2 web servis platformu gibi kütüphaneler hakkında duydum, ama ne PHP web servisini kullanmak için en iyi (ya da iyi ve öğrenmesi kolay) olduğunu bilmiyor musun?
SOAP kesinlikle Web hizmetlerini uygulamak için tek yol değildir. Eğer diğer paradigmaları açık iseniz, REST bakabilirsiniz:
http://en.wikipedia.org/wiki/Representational%5FState%5FTransfer
SOAP (çoklu standartlar / sunucuları olan) aksine, DİNLENME satıcı-ve protokol-agnostik hem de. Bunun yerine, dinlendirici Web hizmetleri (Wikipedia makalesi) bu yönergeleri kullanılarak uygulanır:
A RESTful web service (also called a RESTful web API) is a simple web service implemented using HTTP and the principles of REST. Such a web service can be thought about as a collection of resources. The definition of such a web service can be thought of as comprising three aspects:
* The base URI for the web service, such as http://example.com/resources/ * The MIME type of the data supported by the web service. This is often JSON, XML or YAML but can be any other valid MIME type. * The set of operations supported by the web service using HTTP methods (e.g., POST, GET, PUT or DELETE).
Geri PHP, burada DİNLENME Sunucu işlevsellik ZendFramework uygulanması için başvuru kılavuzu:
http://framework.zend.com/manual/en/zend.rest.server.html
Ayrıca, burada bazı yararlı bilgiler yeniden başvuruyor verdi başka bir yanıt için bir link. ZendFramework ve DİNLENME:
http://stackoverflow.com/questions/1687036/lightweight-restful-php-server/1687099#1687099
-Aj
PHP 5, orada bir PHP SOAP kütüphanede inşa. Daha hızlı ve kararlı olma eğilimi gibi, genellikle yerine PHP uygulamaları dışındaki kütüphanelerde inşa kullanma eğiliminde.
Inşa kullanmadığınız zaman ben birinde kullanılan bir kitaplık, SOAP inşa üstüne inşa edilmiş ve onunla çalışma kolaylaştırır Zend_Soap vardır.
SOAP, REST ve JSON kapsar PHP and Web Services sunumda bir göz atın lütfen.