The xmlrpcval class is used to define an XML-RPC value. When we construct a class
of this type, we pass two parameters, the value itself and the value type.
The xmlrpcresp class is used to encapsulate an XML-RPC response. When we
construct a class of this type, we pass one parameter, the return xmlrpcval object. If
an error is encountered, there is a different set of parameters that we can pass. For
more information about this, please refer to the official phpxmlrpc documentation:
http://phpxmlrpc.sourceforge.net/doc/.
This means that our static example methods will both return a struct value. The
returned struct value will be populated with three values??”value1, value2, and
product. We return value1 and value2 so that the client can verify that nothing has
corrupted the input values during transport.
To test an XML-RPC plugin we can use the phpxmlrpc debugger, which is available
at http://phpxmlrpc.sourceforge.net/.
Chapter 10
[ 307 ]
The debugger enables us to make XML-RPC calls to remote systems and view the
responses.
Pages:
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422