[wsf-c-dev] [PHP] WSService API additions
James Clark
james at wso2.com
Mon Feb 12 22:29:30 PST 2007
> 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?
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?
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
More information about the Wsf-c-dev
mailing list