Difference between revisions of "Freeside:3:Documentation:Developer/FS/XMLRPC"
From Freeside
m (Edit via perl MediaWiki framework (1.13)) |
m (Edit via perl MediaWiki framework (1.13)) |
||
Line 32: | Line 32: | ||
Hey! '''The above document had some coding errors, which are explained below:''' | Hey! '''The above document had some coding errors, which are explained below:''' | ||
− | ; Around line | + | ; Around line 153: |
:You forgot a '=back' before '=head1' | :You forgot a '=back' before '=head1' |
Latest revision as of 14:40, 27 June 2014
NAME
FS::XMLRPC - Object methods for handling XMLRPC requests
SYNOPSIS
use FS::XMLRPC; $xmlrpc = new FS::XMLRPC; ($error, $response_xml) = $xmlrpc->serve($request_xml);
DESCRIPTION
The FS::XMLRPC object is a mechanisim to access read-only data from freeside's subroutines. It does not, at least not at this point, give you the ability to access methods of freeside objects remotely. It can, however, be used to call subroutines such as FS::cust_main::smart_search and FS::Record::qsearch.
See the serve method below for calling syntax.
METHODS
- new
- Provides a FS::XMLRPC object used to handle incoming XMLRPC requests.
- serve REQUEST_XML_SCALAR
- The serve method takes a scalar containg an XMLRPC request for one of freeside's subroutines (not object methods). Parameters passed in the 'methodCall' will be passed as a list to the subroutine untouched. The return value of the called subroutine _must_ be a freeside object reference (eg. qsearchs) or a list of freeside object references (eg. qsearch, smart_search), _and_, the object(s) returned must support the hashref method. This will be checked first by calling UNIVERSAL::can('FS::class::subroutine', 'hashref').
- Return value is an XMLRPC methodResponse containing the results of the call. The result of the subroutine call itself will be coded in the methodResponse as an array of structs, regardless of whether there was many or a single object returned. In other words, after you decode the response, you'll always have an array.
BUGS
Probably lots.
SEE ALSO
POD ERRORS
Hey! The above document had some coding errors, which are explained below:
- Around line 153:
- You forgot a '=back' before '=head1'