[wsf-c-dev] [wsf-php] API for adding classes to WSService

nandika nandika at wso2.com
Mon Nov 12 21:57:30 PST 2007


Samisa Abeysinghe wrote:
> How does the PHP 5 SOAP ext do this?
PHP 5 SOAP ext has a setClass method which accepts classname and a set 
of parameters as arguments. Since we have used arrays for most of our api,
I think we should go with array syntax.

-- Nandika

>
> 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
>>
>>
>
>
> _______________________________________________
> 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