Class: xmlrpcresp

xmlrpcresp(val, fcode, fstr, valtyp)

new xmlrpcresp(val, fcode, fstr, valtyp)

Parameters:
Name Type Description
val any either an xmlrpcval obj, a js value or the xml serialization of an xmlrpcval (a string)
fcode int set it to anything but 0 to create an error response
fstr string the error string, in case of an error response
valtyp string either 'xmlrpcvals', 'jsvals' or 'xml'. When unspecified, the type of the val parameter is analyzed to best guess how to encode it (any js string will be assumed to be the xml representation of a response)
Source:

Methods

cookies()

Returns an array with the cookies received from the server. Array has the form: cookiename => array ('value' => val, attr1 => val1, attr2 = val2, ...) with attributes being e.g. 'expires', 'path', domain'. NB: cookies sent as 'expired' by the server (i.e. with an expiry date in the past) are still present in the array. It is up to the user-defined code to decide how to use the received cookies, and whether they have to be sent back with the next request to the server (using xmlrpc_client::setCookie) or not
Source:
Returns:
array of cookies received from the server

faultCode()

Returns the error code of the response.
Source:
Returns:
the error code of this response (0 for not-error responses)

faultString()

Returns the error string of the response.
Source:
Returns:
the error string of this response ('' for not-error responses)

serialize(charset_encoding)

Returns xml representation of the response. XML prologue not included
Parameters:
Name Type Description
charset_encoding string the charset to be used for serialization. If null, US-ASCII is assumed
Source:
Returns:
the xml representation of the response

value()

Returns the value received by the server.
Source:
Returns:
the xmlrpcval object returned by the server. Might be an xml string or js value if the response has been created by specially configured xmlrpc_client objects