Class: Ronin::RPC::PHP::Response
- Inherits:
-
RPC::Response
- Object
- RPC::Response
- Ronin::RPC::PHP::Response
- Defined in:
- lib/ronin/rpc/php/response.rb
Class Method Summary collapse
-
.parser ⇒ Object
Returns the default XML parser to use for parsing XMLRPC responses.
- .parser=(new_parser) ⇒ Object
Instance Method Summary collapse
-
#decode ⇒ Object
Decodes the XMLRPC response message embedded in the response from the server.
Class Method Details
.parser ⇒ Object
Returns the default XML parser to use for parsing XMLRPC responses.
38 39 40 |
# File 'lib/ronin/rpc/php/response.rb', line 38 def Response.parser @@parser ||= XMLRPC::XMLParser::REXMLStreamParser.new end |
.parser=(new_parser) ⇒ Object
42 43 44 |
# File 'lib/ronin/rpc/php/response.rb', line 42 def Response.parser=(new_parser) @@parser = new_parser end |
Instance Method Details
#decode ⇒ Object
Decodes the XMLRPC response message embedded in the response from the server.
50 51 52 53 54 55 56 57 58 |
# File 'lib/ronin/rpc/php/response.rb', line 50 def decode response = @contents[/<rpc>.*<\/rpc>/m] unless response raise(ResponseMissing,"failed to receive a valid RPC method response",caller) end return Response.parser.parseMethodResponse(response) end |