GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Protocol::XMLRPC::MethodResponse(3) User Contributed Perl Documentation Protocol::XMLRPC::MethodResponse(3)

Protocol::XMLRPC::MethodResponse - XML-RPC methodResponse response

    my $method_response = Protocol::XMLRPC::MethodResponse->new;
    $method_response->param(1);

    $method_response = Protocol::XMLRPC::MethodResponse->parse(...);

XML-RPC methodResponse response object.

Hold method response parameter as object.

Creates a new Protocol::XMLRPC::MethodResponse instance.

    my $method_response =
      Protocol::XMLRPC::MethodResponse->new_fault(255 => 'Unknown error');

Creates a new Protocol::XMLRPC::MethodResponse instance with a fault.

    my $method_response = Protocol::XMLRPC::MethodResponse->parse('<?xml ...');

Creates a new Protocol::XMLRPC::MethodResponse from xml.

    $method_response->param(1);
    $method_response->param(Protocol::XMLRPC::Value::String->new('foo'));
    my $param = $method_response->param;

Set/get parameter. Tries to guess a type if a Perl5 scalar/arrayref/hashref was passed instead of an object.

    $method_response->fault(255 => 'Unknown error');
    my $fault = $method_response->fault;

Set/get XML-RPC fault struct.

Shortcut for $method_response->fault->members->{faultCode}->value.

Shortcut for $method_response->fault->members->{faultString}->value.

    # normal response
    my $method_response = Protocol::XMLRPC::MethodResponse->new;
    $method_response->param('baz');
    # <?xml version="1.0"?>
    # <methodResponse>
    #    <params>
    #       <param>
    #          <value><string>baz</string></value>
    #       </param>
    #    </params>
    # </methodResponse>

    # fault response
    my $method_response = Protocol::XMLRPC::MethodResponse->new;
    $method_response->fault(255 => 'Unknown method');
    # or
    my $method_response =
      Protocol::XMLRPC::MethodResponse->new_fault(255 => 'Unknown method');
    # <?xml version="1.0"?>
    # <methodResponse>
    #    <fault>
    #       <value>
    #          <struct>
    #             <member>
    #                <name>faultCode</name>
    #                <value><int>255</int></value>
    #             </member>
    #             <member>
    #                <name>faultString</name>
    #                <value><string>Unknown method</string></value>
    #             </member>
    #          </struct>
    #       </value>
    #    </fault>
    # </methodResponse>

Protocol::XMLRPC::MethodResponse string representation.

2011-05-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.