ted_pedersen | 21 Mar 2011 02:56
Picon
Gravatar

RPC::XML perl module, valid values for signature?

Greetings all,

Can anyone shed light on how signatures should be used in RPC::XML::Server? 

The documentation is fairly vague...

=====

http://search.cpan.org/~rjray/RPC-XML-0.74/lib/RPC/XML/Server.pm#Methods

signature

    A list reference of the signatures by which this routine may be invoked. Every method has at least one
signature. Though less efficient for cases of exactly one signature, a list reference is always used for
sake of consistency.

=====

What are the valid values for the signature field, and what do they represent? 

Below is an example where you can see the signature field in action... what you see are the fields include
things like "array", "array string", "array array"...Is there a finite set of values for these fields,
and if so, what are they? 

# This is an example program from Programming Web Services with Perl,
# by Randy Ray and Pavel Kulchenko

use strict;
use warnings;

(Continue reading)

Ted Pedersen | 22 Mar 2011 15:11
Picon
Gravatar

Re: RPC::XML perl module, valid values for signature?

To answer my own query just a bit, here's a tutorial that's somewhat
helpful, although it doesn't get into the signature issue much ...

http://www.herongyang.com/perl_b/rpc_xml.html

From the book "Web Services Programming with Perl" (page 312), I've found
that the valid data classes for RPC::XML are ...

int, i4, double, string, boolean, datetime_iso8601, base64, array, struct,
fault

So is it fair/safe to assume that these are the values that may be in the
signature field/list, as in...

->add_proc({ name => 'fortune',
signature => [ 'array',
'array string',
'array array' ],
code => \&XRFortune::fortune })

And so a signature like

[struct, int, int]

means that the method/procedure returns a struct, and expects 2 integers as
input??

Thanks for any guidance that can be offered, especially if the above is
wrong or misses some important point.

(Continue reading)

Bryan Henderson | 22 Mar 2011 17:02

Re: RPC::XML perl module, valid values for signature?

It looks like the values of the "signature" Perl array are just the values of
the XML-RPC array for that signature which is the result of the
system.methodSignature result.

See <http://xmlrpc-c.sourceforge.net/introspection.html>.

-- 
Bryan Henderson                                   San Jose, California

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    xml-rpc-digest <at> yahoogroups.com 
    xml-rpc-fullfeatured <at> yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    xml-rpc-unsubscribe <at> yahoogroups.com

(Continue reading)


Gmane