Class: XMLRPC::XMLParser::AbstractStreamParser
- Inherits:
-
Object
- Object
- XMLRPC::XMLParser::AbstractStreamParser
show all
- Defined in:
- lib/xmlrpc/parser.rb
Overview
Instance Method Summary
collapse
Instance Method Details
#parseMethodCall(str) ⇒ Object
465
466
467
468
469
470
|
# File 'lib/xmlrpc/parser.rb', line 465
def parseMethodCall(str)
parser = @parser_class.new
parser.parse(str)
raise "No valid method call - missing method name!" if parser.method_name.nil?
[parser.method_name, parser.params]
end
|
#parseMethodResponse(str) ⇒ Object
450
451
452
453
454
455
456
457
458
459
460
461
462
463
|
# File 'lib/xmlrpc/parser.rb', line 450
def parseMethodResponse(str)
parser = @parser_class.new
parser.parse(str)
raise "No valid method response!" if parser.method_name != nil
if parser.fault != nil
[false, parser.fault]
else
raise "Missing return value!" if parser.params.size == 0
raise "Too many return values. Only one allowed!" if parser.params.size > 1
[true, parser.params[0]]
end
end
|