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


Manual Reference Pages  -  PROTOCOL::XMLRPC::METHODRESPONSE (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



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

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



DESCRIPTION

XML-RPC methodResponse response object.

ATTRIBUTES

CWparam

Hold method response parameter as object.

METHODS

CWnew

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

CWnew_fault



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



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

CWparse



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



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

CWparam



    $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.

CWfault



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



Set/get XML-RPC fault struct.

CWfault_code

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

CWfault_string

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

CWto_string



    # 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.

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


perl v5.20.3 PROTOCOL::XMLRPC::METHODRESPONSE (3) 2011-05-05

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