[wsf-c-dev] [wsf-php] API for adding classes to WSService
Samisa Abeysinghe
samisa at wso2.com
Mon Nov 12 21:41:36 PST 2007
How does the PHP 5 SOAP ext do this?
Samisa...
Buddhika Semasinghe wrote:
> nandika wrote:
>> Hi all,
>> At the moment we only support exposing php functions as operations in
>> server side. However a user may need to expose php class methods
>> as operations as well.
>>
>> I think we can do this in 2 ways.
>>
>> 1 . adding an additional option to WSService as "classes" which would
>> be an array of arrays as follows.
>>
>> WSService( array("classes"=>array(array("foo",$operations, $actions))));
>
> I think array of array option is better since it looks our API more
> consistent. Is it better if the option array would be like this
>
> WSService (array("classes" => array("foo" => array($operations,
> $actions),
> "bar" =>
> array($operations1, $actions1))))
>
> Thanks
>
> Buddhika
>>
>>
>> Here, "foo" is the class name. $operations, and $actions are optional
>> arrays. $operations is an
>> array of operations to functions mapping similar to what we already
>> have for functions.
>> If $operations is not specified , all public functions of class 'foo'
>> will be exposed as operations with the function name as operation name.
>> $actions will be an array of operations to actions mapping.
>>
>> 2. adding a setClass method to the API.
>>
>> setClass(String classname, array of operations, array of actions);
>>
>> What would be the better way ?
>>
>> -- Nandika
>>
>>
>>
>>
>>
>> _______________________________________________
>> Wsf-c-dev mailing list
>> Wsf-c-dev at wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>>
>
>
> _______________________________________________
> Wsf-c-dev mailing list
> Wsf-c-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/wsf-c-dev
>
>
More information about the Wsf-c-dev
mailing list