[wsf-c-dev] [PHP] WSService API additions

Samisa Abeysinghe samisa at wso2.com
Mon Feb 12 23:15:29 PST 2007


James Clark wrote:
>> I suppose we need to add returnName attribute to WSMethodSignature.
>>     
>
> Exactly.
>
>   
>> Also, if signature spec is not given, we can assume defaults. 
>>
>> In case of wrapping SoapParam, one of the challenges is that, SoapParam 
>> could be constructed within the user function. So I am wondering how we 
>> could make use WSMethodSignature to support SoapParam.
>>     
>
> I see the problem. I still think adding the returnName attribute is the
> clean way for us to provide the useful functionality provided by
> SoapParam in this scenario, but it doesn't help with implementing the
> existing API.
>
> Will the following work?
>   
My feeling is that the following you have suggested would work. I will 
try to implement it and see how it goes.

> 1. We provide a compatibility function that turns a SoapParam
> representing a return value into the corresponding SimpleXML for the
> payload.
>
> 2. When the user specifies a function foo with the Soap ext API, we
> implement this by wrapping foo in a function foo_wrapper before giving
> it to our API. foo_wrapper calls foo with the same arguments that
> foo_wrapper gets, but it uses the compatibility function (from 1) to
> convert the return value.  I don't know how we would handle creating
> foo_wrapper dynamically. Does php have closures?
>   
PHP does not support closures.

Samisa...
> 3. WSMethodSignature is extended to allow it to be specified that a
> function is taking responsibility for mapping its return value to XML
> (or maybe a SimpleXML/DOM return value is automatically passed through
> as is if the method signature doesn't specify the return type).
>
> James
>
>
>
>   


-- 
Samisa Abeysinghe : http://www.wso2.org/ (WSO2 Oxygen Tank - Web Services Developers' Portal)





More information about the Wsf-c-dev mailing list