GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Saturday, April 16, 2011

Zend - Creating SOAP Server

After you create and define your custom class and the corrisponding WSDL document, now you can create SOAP server. Read more on http://www.phpriot.com/articles/zend-soap/6

file: webservice.php
<?php
require_once 'mywebservice.php';
if($_SERVER['QUERY_STRING'] == 'wsdl'){
    // WSDL document creation
}else{
   // SOAP Server creation
   require_once "Zend/Soap/Server.php";
    $soapServer = new Zend_Soap_Server("http://localhost/webservice.php?wsdl");
    $soapServer->setClass('MyWebService');
    $soapServer->handle();
}
Share/Bookmark

No comments:

Post a Comment