Feature of Zend_Soap_Server, Not Able to Identify

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Feature of Zend_Soap_Server, Not Able to Identify

ramesht123

 

Hi,

Just to brief, I have been using Nusoap for my client-server web services operations. Recently I have shifted to Zend Framework, and in the process of migration, Im struck up with one of the feature. The below code is an example as how we Register a Service with the Server. I would like to know how to implement the same feature using ZEND_SOAP_SERVER.

 

The sample code is:

 

$server->register('PublisherGetDetails',array('sessionid'=>'xsd:string','Publisherid'=>'xsd:int'),

                                array('return'=>'tns:MultipleGetPublisherName'),

                                'urn:Publisher',

                                'urn:Publisher#PublisherGetDetails',

                                'rpc',

                                'encoded',

                                'To  Get publisher'

                );

 

How should I register the services with the Server in Zend Framework. Any Suggestions? Thanks in Advancee.

 

 

 

Regards,

Ramesh

 

Reply | Threaded
Open this post in threaded view
|

Re: Feature of Zend_Soap_Server, Not Able to Identify

Benjamin Eberlei-2
Hello Ramesh,

Zend_Soap builds upon the PHP SOAPServer class (php.net/soap). It only allows
either the NON-WSDL mode, where php soap client and soap server determine the
communication themselves or the WSDL mode, where a WSDL defines what the server
is capable of.

If you have a function PublisherGetDetails($sessionId, $publisherId) you would
use it the following way:

$server = new Zend_Soap_Server('wsdlfile.wsdl');
$server->addFunction('PublisherGetDetails');
$server->handle();

you would generate the corresponding WSDL file dynamically via:

$wsdl = new Zend_Soap_Autodiscover(false, 'uri where server relies');
$wsdl->addFunction('PublisherGetDetails');
$wsdl->handle();

Currently Server and WSDL Generation are separated but for 1.8 it is planned
to offer a merged class that combines those two and would offer a more
streamlined procedure.

Also feedback is always welcome on howto improve the SOAP component. Since the
use cases vary vastly and also integration with different languages poses
problems we are always eager for feedback on how one could improve the
communication of the server.

greetings,
Benjamin

On Wednesday 21 January 2009 05:23:36 Ramesh Thupakula wrote:

> Hi,
> Just to brief, I have been using Nusoap for my client-server web services
> operations. Recently I have shifted to Zend Framework, and in the process
> of migration, Im struck up with one of the feature. The below code is an
> example as how we Register a Service with the Server. I would like to know
> how to implement the same feature using ZEND_SOAP_SERVER.
>
> The sample code is:
>
> $server->register('PublisherGetDetails',array('sessionid'=>'xsd:string','Pu
>blisherid'=>'xsd:int'), array('return'=>'tns:MultipleGetPublisherName'),
> 'urn:Publisher',
>                                 'urn:Publisher#PublisherGetDetails',
>                                 'rpc',
>                                 'encoded',
>                                 'To  Get publisher'
>                 );
>
> How should I register the services with the Server in Zend Framework. Any
> Suggestions? Thanks in Advancee.
>
>
>
> Regards,
> Ramesh

--
Benjamin Eberlei
http://www.beberlei.de