[BUG]: XMLRPC 1.0-alpha4 calls with -/+ 1 arg fail

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[BUG]: XMLRPC 1.0-alpha4 calls with -/+ 1 arg fail

Sean P. DeNigris
Administrator
It seems that 1.0-alpha4 only handles calls with one argument. The problem seems to be in following statement from XMLRPCServerRequest>>methodResponse:
    ret := ((srv key) perform: (srv value) with: (self params)).
#perform:with: only expects one argument (per the comment) and fails if otherwise

A solution is to use #perform:withArguments: like so:
    ret := ((srv key) perform: (srv value) withArguments: self params asArray).
n.b. The parameters are stored in an OrderedCollection, which must be converted to an array

Changeset attached: XMLRPCServerRequest-methodResponse.st

HTH,

Sean
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: [BUG]: XMLRPC 1.0-alpha4 calls with -/+ 1 arg fail

garduino
Thanks for the report and .cs. Will look asap.
Cheers.

2011/2/28, Sean P. DeNigris <[hidden email]>:

> It seems that 1.0-alpha4 only handles calls with one argument. The problem
> seems to be in following statement from XMLRPCServerRequest>>methodResponse:
>     ret := ((srv key) perform: (srv value) with: (self params)).
> #perform:with: only expects one argument (per the comment) and fails if
> otherwise
>
> A solution is to use #perform:withArguments: like so:
>     ret := ((srv key) perform: (srv value) withArguments: self params
> asArray).
> n.b. The parameters are stored in an OrderedCollection, which must be
> converted to an array
>
> Changeset attached:
> http://forum.world.st/file/n3328882/XMLRPCServerRequest-methodResponse.st
> XMLRPCServerRequest-methodResponse.st
>
> HTH,
>
> Sean
>
> --
> View this message in context:
> http://forum.world.st/BUG-XMLRPC-1-0-alpha4-calls-with-1-arg-fail-tp3328882p3328882.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>


--
=================================================
Germán S. Arduino  <gsa @ arsol.net>   Twitter: garduino
Arduino Software & Web Hosting   http://www.arduinosoftware.com
PasswordsPro  http://www.passwordspro.com
=================================================

Reply | Threaded
Open this post in threaded view
|

Re: [BUG]: XMLRPC 1.0-alpha4 calls with -/+ 1 arg fail

garduino
Hi Sean:

I looked into it and seems that the cs introduce a failing test. Will
check deeper when have time.

Cheers.

2011/2/28 Germán Arduino <[hidden email]>:

> Thanks for the report and .cs. Will look asap.
> Cheers.
>
> 2011/2/28, Sean P. DeNigris <[hidden email]>:
>> It seems that 1.0-alpha4 only handles calls with one argument. The problem
>> seems to be in following statement from XMLRPCServerRequest>>methodResponse:
>>     ret := ((srv key) perform: (srv value) with: (self params)).
>> #perform:with: only expects one argument (per the comment) and fails if
>> otherwise
>>
>> A solution is to use #perform:withArguments: like so:
>>       ret := ((srv key) perform: (srv value) withArguments: self params
>> asArray).
>> n.b. The parameters are stored in an OrderedCollection, which must be
>> converted to an array
>>
>> Changeset attached:
>> http://forum.world.st/file/n3328882/XMLRPCServerRequest-methodResponse.st
>> XMLRPCServerRequest-methodResponse.st
>>
>> HTH,
>>
>> Sean
>>
>> --
>> View this message in context:
>> http://forum.world.st/BUG-XMLRPC-1-0-alpha4-calls-with-1-arg-fail-tp3328882p3328882.html
>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>>
>>
>
>
> --
> =================================================
> Germán S. Arduino  <gsa @ arsol.net>   Twitter: garduino
> Arduino Software & Web Hosting   http://www.arduinosoftware.com
> PasswordsPro  http://www.passwordspro.com
> =================================================
>



--
=================================================
Germán S. Arduino  <gsa @ arsol.net>   Twitter: garduino
Arduino Software & Web Hosting   http://www.arduinosoftware.com
PasswordsPro  http://www.passwordspro.com
=================================================