Re: SOAP in Pike?
"Stephen R. van den Berg" <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
Pontus ??stlund wrote:
>> Web.SOAP.Promise("https://foo.bar/Logon.svc?wsdl")
>> .on_success(lambda(Web.SOAP.Client soap) {
>> Web.SOAP.Arguments args, sh;
>> args = soap->getarguments("Logon");
>> sh = args->LogonRequestMsg;
>> sh->Username = "foo";
>> sh->Password = "bar";
>> sh->WebServiceType = "Publisher";
>> soap->call(args)
>> .on_success(lambda(mixed resp) {
>> string token = resp->CredentialToken;
>> });
>> });
>The only thing that sticks out to me is that "getarguments()" should be "get_arguments()" to conform to the Pike naming conventions.
Ok, fixed.
Also fixed some other things.
Brushed up the documentation a bit.
We still need some test-suite entries for this, but that's not for today.
If anyone wants to step in for those, please do...
The only thing that can be tested is providing the Web.SOAP.Client.create()
with a prefabricated XML-wsdl description, then use get_arguments and
set some parameters.
Incidentally, internally in SOAP.Client I used the JavaScript then() method
to chain the Futures/Promises to preserve my own sanity.
Chaining futures/promises without using the then() method is a bit of
a challenge.
--
Stephen.