Qore XML Module  1.1
 All Classes Namespaces Functions Variables Groups
XML-RPC Functions

Functions

string Qore::Xml::makeFormattedXMLRPCCallString (string method,...)
 Serializes the argument into an XML string in XML-RPC call format with whitespace formatting.
string Qore::Xml::makeFormattedXMLRPCCallStringArgs (string method, any argv)
 Serializes the argument into an XML string in XML-RPC call format with whitespace formatting.
string Qore::Xml::makeFormattedXMLRPCCallStringArgsWithEncoding (string encoding, string method, any argv)
 Serializes the argument into an XML string in XML-RPC call format with whitespace formatting.
string Qore::Xml::makeFormattedXMLRPCCallStringWithEncoding (string encoding, string method,...)
 Serializes the argument into an XML string in XML-RPC call format with whitespace formatting with an explicit encoding.
string Qore::Xml::makeFormattedXMLRPCFaultResponseString (softint code, string msg)
 Serializes the argument into an XML string in XML-RPC fault response format with whitespace formatting.
string Qore::Xml::makeFormattedXMLRPCFaultResponseStringWithEncoding (string encoding, softint code, string msg)
 Serializes the argument into an XML string in XML-RPC fault response format with whitespace formatting with an explicit output encoding.
string Qore::Xml::makeFormattedXMLRPCResponseString (...)
 Serializes the arguments into an XML string formatted for an XML-RPC response with whitespace formatting.
string Qore::Xml::makeFormattedXMLRPCResponseStringWithEncoding (string encoding,...)
 Serializes the arguments into an XML string formatted for an XML-RPC response with whitespace formatting and with an explicit output encoding.
*string Qore::Xml::makeFormattedXMLRPCValueString (any value, *string encoding)
 Serializes the arguments into an XML string in XML-RPC value format with whitespace formatting but without an XML header.
string Qore::Xml::makeXMLRPCCallString (string method,...)
 Serializes the argument into an XML string in XML-RPC call format without whitespace formatting.
string Qore::Xml::makeXMLRPCCallStringArgs (string method, any args)
 Serializes the argument into an XML string in XML-RPC call format without whitespace formatting.
string Qore::Xml::makeXMLRPCCallStringArgsWithEncoding (string encoding, string method, any args)
 Serializes the argument into an XML string in XML-RPC call format without whitespace formatting with an explicit encoding.
string Qore::Xml::makeXMLRPCCallStringWithEncoding (string encoding, string method,...)
 Serializes the argument into an XML string in XML-RPC call format without whitespace formatting with an explicit encoding.
string Qore::Xml::makeXMLRPCFaultResponseString (softint code, string msg)
 Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting.
string Qore::Xml::makeXMLRPCFaultResponseStringWithEncoding (string encoding, softint code, string msg)
 Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting with an explicit output encoding.
string Qore::Xml::makeXMLRPCResponseString (...)
 Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting.
string Qore::Xml::makeXMLRPCResponseStringWithEncoding (string encoding,...)
 Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting and with an explicit output encoding.
*string Qore::Xml::makeXMLRPCValueString (any value, *string encoding)
 Serializes the arguments into an XML string in XML-RPC value format without whitespace formatting and without an XML header.
hash Qore::Xml::parseXMLRPCCall (string xml, *string encoding)
 Deserializies an XML-RPC call string, returning a Qore data structure representing the call information.
nothing Qore::Xml::parseXMLRPCCall ()
 This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.
hash Qore::Xml::parseXMLRPCResponse (string xml, *string encoding)
 Deserializies an XML-RPC response string, returning a Qore data structure representing the response information.
nothing Qore::Xml::parseXMLRPCResponse ()
 This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.
any Qore::Xml::parseXMLRPCValue (string xml, *string encoding)
 Deserializies an XML-RPC value string and returns a Qore data structure representing the information.
nothing Qore::Xml::parseXMLRPCValue ()
 This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.

Detailed Description


Function Documentation

string Qore::Xml::makeFormattedXMLRPCCallString ( string  method,
  ... 
)

Serializes the argument into an XML string in XML-RPC call format with whitespace formatting.

Code Flags:
RET_VALUE_ONLY
Parameters:
methodthe method name for the XML-RPC call
...additional arguments are serialized according to the default XML-RPC serialization rules
Returns:
an XML string in XML-RPC call format in the default encoding, with whitespace formatting
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $xmlcall = makeFormattedXMLRPCCallString("omq.system.start-workflow", $hash);
See also:
XML-RPC
string Qore::Xml::makeFormattedXMLRPCCallStringArgs ( string  method,
any  argv 
)

Serializes the argument into an XML string in XML-RPC call format with whitespace formatting.

Code Flags:
RET_VALUE_ONLY
Parameters:
methodthe method name for the XML-RPC call
argva single argument or a list of arguments to the call
Returns:
an XML string in XML-RPC call format in the default encoding, with whitespace formatting
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $xmlcall = makeFormattedXMLRPCCallStringArgs("omq.system.start-workflow", $hash);
See also:
XML-RPC
string Qore::Xml::makeFormattedXMLRPCCallStringArgsWithEncoding ( string  encoding,
string  method,
any  argv 
)

Serializes the argument into an XML string in XML-RPC call format with whitespace formatting.

Code Flags:
RET_VALUE_ONLY
Parameters:
encodinga string giving the output encoding for the resulting XML string
methodthe method name for the XML-RPC call
argva single argument or a list of arguments to the call
Returns:
a string in XML-RPC call format in the encoding given by the first argument, with whitespace formatting
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $xmlcall = makeFormattedXMLRPCCallStringArgsWithEncoding("utf8", "omq.system.start-workflow", $hash);
See also:
XML-RPC
string Qore::Xml::makeFormattedXMLRPCCallStringWithEncoding ( string  encoding,
string  method,
  ... 
)

Serializes the argument into an XML string in XML-RPC call format with whitespace formatting with an explicit encoding.

Code Flags:
RET_VALUE_ONLY
Parameters:
encodinga string giving the output encoding for the resulting XML string
methodthe method name for the XML-RPC call

Additional arguments are serialized according to the default XML-RPC serialization rules

Returns:
an XML string in XML-RPC call format in the encoding given by the first argument, with whitespace formatting
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $xmlcall = makeFormattedXMLRPCCallStringWithEncoding("utf8", "omq.system.start-workflow", $hash);
See also:
XML-RPC
string Qore::Xml::makeFormattedXMLRPCFaultResponseString ( softint  code,
string  msg 
)

Serializes the argument into an XML string in XML-RPC fault response format with whitespace formatting.

Code Flags:
CONSTANT
Parameters:
codethe fault code for the response; will be converted to an integer (stored under key 'faultCode' as an int)
msgthe fault message string; the encoding of this argument will define the output encoding of the fault string returned (stored under key 'faultString' as a string)
Returns:
a string in XML-RPC fault format in the same encoding as given by the $msg argument, with whitespace formatting
Example:
my string $response = makeFormattedXMLRPCFaultResponseString(500, $errmsg);
See also:
XML-RPC
string Qore::Xml::makeFormattedXMLRPCFaultResponseStringWithEncoding ( string  encoding,
softint  code,
string  msg 
)

Serializes the argument into an XML string in XML-RPC fault response format with whitespace formatting with an explicit output encoding.

Code Flags:
RET_VALUE_ONLY
Parameters:
encodinga string giving the output encoding for the resulting XML string
codethe fault code for the response; will be converted to an integer (stored under key 'faultCode' as an int)
msgthe fault message string (stored under key 'faultString' as a string)
Returns:
a string in XML-RPC fault format in the encoding given by the first argument, with whitespace formatting
Exceptions:
ENCODING-CONVERSION-ERRORerror converting message string to specified output encoding
Example:
my string $response = makeFormattedXMLRPCFaultResponseStringWithEncoding("utf8", 500, $errmsg);
See also:
XML-RPC
string Qore::Xml::makeFormattedXMLRPCResponseString (   ...)

Serializes the arguments into an XML string formatted for an XML-RPC response with whitespace formatting.

Code Flags:
RET_VALUE_ONLY
Parameters:
...any top-level arguments to the function will be serialized as the top-level params of the response message
Returns:
a string in XML-RPC response format with whitespace formatting; the encoding of the resulting string will always be the default encoding
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $response = makeFormattedXMLRPCResponseString($answer);
See also:
XML-RPC
string Qore::Xml::makeFormattedXMLRPCResponseStringWithEncoding ( string  encoding,
  ... 
)

Serializes the arguments into an XML string formatted for an XML-RPC response with whitespace formatting and with an explicit output encoding.

Code Flags:
RET_VALUE_ONLY
Parameters:
encodinga string giving the output encoding for the resulting XML string
...any top-level arguments after the first argument will be serialized as the top-level params of the response message
Returns:
a string in XML-RPC response format with whitespace formatting; the encoding will be that given by the first argument
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $response = makeFormattedXMLRPCResponseStringWithEncoding("utf8", $answer);
See also:
XML-RPC
*string Qore::Xml::makeFormattedXMLRPCValueString ( any  value,
*string  encoding 
)

Serializes the arguments into an XML string in XML-RPC value format with whitespace formatting but without an XML header.

Code Flags:
RET_VALUE_ONLY
Parameters:
valuethe value to serialize to XML-RPC format
encodingan optional string giving the encoding for the output XML string; if this parameter is missing, the output string will have the default encoding
Returns:
if the $value argument is NOTHING, then NOTHING is returned, otherwise an XML string in XML-RPC value format with whitespace formatting but without an XML header is returned
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my *string $val = makeFormattedXMLRPCValueString($v);
See also:
XML-RPC
string Qore::Xml::makeXMLRPCCallString ( string  method,
  ... 
)

Serializes the argument into an XML string in XML-RPC call format without whitespace formatting.

Code Flags:
RET_VALUE_ONLY
Parameters:
methodthe method name for the XML-RPC call Additional arguments are serialized according to the default XML-RPC serialization rules
Returns:
an XML string in XML-RPC call format in the default encoding, without whitespace formatting
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $xmlcall = makeXMLRPCCallString("omq.system.start-workflow", $hash);
See also:
XML-RPC
string Qore::Xml::makeXMLRPCCallStringArgs ( string  method,
any  args 
)

Serializes the argument into an XML string in XML-RPC call format without whitespace formatting.

Code Flags:
RET_VALUE_ONLY
Parameters:
methodthe method name for the XML-RPC call
argsa single argument or a list of arguments to the call
Returns:
an XML string in XML-RPC call format in the default encoding, without whitespace formatting
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $xmlcall = makeXMLRPCCallStringArgs("omq.system.start-workflow", $hash);
See also:
XML-RPC
string Qore::Xml::makeXMLRPCCallStringArgsWithEncoding ( string  encoding,
string  method,
any  args 
)

Serializes the argument into an XML string in XML-RPC call format without whitespace formatting with an explicit encoding.

Code Flags:
RET_VALUE_ONLY
Parameters:
encodinga string giving the output encoding for the resulting XML string
methodthe method name for the XML-RPC call
argsa single argument or a list of arguments to the call
Returns:
a string in XML-RPC call format in the encoding given by the first argument, without whitespace formatting
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $xmlcall = makeXMLRPCCallStringArgsWithEncoding("utf8", "omq.system.start-workflow", $hash);
See also:
XML-RPC
string Qore::Xml::makeXMLRPCCallStringWithEncoding ( string  encoding,
string  method,
  ... 
)

Serializes the argument into an XML string in XML-RPC call format without whitespace formatting with an explicit encoding.

Code Flags:
RET_VALUE_ONLY
Parameters:
encodinga string giving the output encoding for the resulting XML string
methodthe method name for the XML-RPC call Additional arguments are serialized according to the default XML-RPC serialization rules
Returns:
an XML string in XML-RPC call format in the encoding given by the first argument, without whitespace formatting
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $xmlcall = makeXMLRPCCallStringWithEncoding("utf8", "omq.system.start-workflow", $hash);
See also:
XML-RPC
string Qore::Xml::makeXMLRPCFaultResponseString ( softint  code,
string  msg 
)

Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting.

Code Flags:
CONSTANT
Parameters:
codethe fault code for the response; will be converted to an integer (stored under key 'faultCode' as an int)
msgthe fault message string; the encoding of this argument will define the output encoding of the fault string returned (stored under key 'faultString' as a string)
Returns:
a string in XML-RPC fault format in the same encoding as given by the $msg argument, without whitespace formatting
Example:
my string $response = makeXMLRPCFaultResponseString(500, $errmsg);
See also:
XML-RPC
string Qore::Xml::makeXMLRPCFaultResponseStringWithEncoding ( string  encoding,
softint  code,
string  msg 
)

Serializes the argument into an XML string in XML-RPC fault response format without whitespace formatting with an explicit output encoding.

Code Flags:
RET_VALUE_ONLY
Parameters:
encodinga string giving the output encoding for the resulting XML string
codethe fault code for the response; will be converted to an integer (stored under key 'faultCode' as an int)
msgthe fault message string (stored under key 'faultString' as a string)
Returns:
a string in XML-RPC fault format in the encoding given by the first argument, without whitespace formatting
Exceptions:
ENCODING-CONVERSION-ERRORerror converting message string to specified output encoding
Example:
my string $response = makeXMLRPCFaultResponseStringWithEncoding("utf8", 500, $errmsg);
See also:
XML-RPC
string Qore::Xml::makeXMLRPCResponseString (   ...)

Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting.

Any top-level arguments to the function will be serialized as the top-level params of the response message

Returns:
a string in XML-RPC response format; the encoding of the resulting string will always be the default encoding
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Code Flags:
RET_VALUE_ONLY
Example:
my string $response = makeXMLRPCResponseString($answer);
See also:
XML-RPC
string Qore::Xml::makeXMLRPCResponseStringWithEncoding ( string  encoding,
  ... 
)

Serializes the arguments into an XML string formatted for an XML-RPC response without whitespace formatting and with an explicit output encoding.

Code Flags:
RET_VALUE_ONLY
Parameters:
encodinga string giving the output encoding for the resulting XML string Any top-level arguments after the first argument will be serialized as the top-level params of the response message
Returns:
a string in XML-RPC response format; the encoding will be that given by the first argument
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my string $response = makeXMLRPCResponseStringWithEncoding("utf8", $answer);
See also:
XML-RPC
*string Qore::Xml::makeXMLRPCValueString ( any  value,
*string  encoding 
)

Serializes the arguments into an XML string in XML-RPC value format without whitespace formatting and without an XML header.

Code Flags:
RET_VALUE_ONLY
Parameters:
valuethe value to serialize to XML-RPC format
encodingan optional string giving the encoding for the output XML string; if this parameter is missing, the output string will have the default encoding
Returns:
if the $value argument is NOTHING, then NOTHING is returned, otherwise an XML string in XML-RPC value format without whitespace formatting and without an XML header is returned
Exceptions:
XMLRPC-SERIALIZATION-ERRORempty member name in hash or cannot serialize type to XML-RPC (ex: object)
Example:
my *string $val = makeXMLRPCValueString($v);
See also:
XML-RPC
hash Qore::Xml::parseXMLRPCCall ( string  xml,
*string  encoding 
)

Deserializies an XML-RPC call string, returning a Qore data structure representing the call information.

Code Flags:
RET_VALUE_ONLY
Parameters:
xmlthe XML string in XML-RPC call format to deserialize
encodingan optional string giving the string encoding of any strings output; if this parameter is missing, the any strings output in the output hash will have the default encoding
Returns:
a hash representing the XML-RPC call with the following keys:
  • methodName: the name of the method being called
  • params: the arguments to the method
Exceptions:
PARSE-XMLRPC-CALL-ERRORmissing 'methodCall' or 'methodName' element or other syntax error
PARSE-XMLRPC-ERRORsyntax error parsing XML-RPC string
Example:
my hash $h = parseXMLRPCCall($xml);
See also:
XML-RPC
nothing Qore::Xml::parseXMLRPCCall ( )

This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.

Code Flags:
RUNTIME_NOOP
hash Qore::Xml::parseXMLRPCResponse ( string  xml,
*string  encoding 
)

Deserializies an XML-RPC response string, returning a Qore data structure representing the response information.

Code Flags:
RET_VALUE_ONLY
Parameters:
xmlthe XML string in XML-RPC call format to deserialize
encodingan optional string giving the string encoding of any strings output; if this parameter is missing, the any strings output in the output hash will have the default encoding
Returns:
a hash with one of the following keys:
  • fault: a hash describing a fault response
  • params: a hash describing a normal, non-fault response
Exceptions:
PARSE-XMLRPC-RESPONSE-ERRORmissing required element or other syntax error
PARSE-XMLRPC-ERRORsyntax error parsing XML-RPC string
Example:
my hash $h = parseXMLRPCResponse($xml);
See also:
XML-RPC
nothing Qore::Xml::parseXMLRPCResponse ( )

This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.

Code Flags:
RUNTIME_NOOP
any Qore::Xml::parseXMLRPCValue ( string  xml,
*string  encoding 
)

Deserializies an XML-RPC value string and returns a Qore data structure representing the information.

Code Flags:
RET_VALUE_ONLY
Parameters:
xmlthe XML string in XML-RPC value format to deserialize
encodingan optional string giving the string encoding of any strings output; if this parameter is missing, the any strings output in the output hash will have the default encoding
Returns:
the Qore value corresponding to the XML-RPC value string
Exceptions:
PARSE-XMLRPC-ERRORsyntax error parsing XML-RPC string
Example:
my any $data = parseXMLRPCValue($xml);
See also:
XML-RPC
nothing Qore::Xml::parseXMLRPCValue ( )

This is a variant that is basically a noop, included for backwards-compatibility for functions that ignored type errors in the calling parameters.

Code Flags:
RUNTIME_NOOP