Class: XMLRPC::XMLParser::AbstractStreamParser

Class | XMLRPC::XMLParser::AbstractStreamParser
In: | xmlrpc/parser.rb
Parent: | Object

### Methods

parseMethodCall parseMethodResponse

### Public Instance methods

parseMethodCall(str)

[Source]

    # File xmlrpc/parser.rb, line 473
          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)

[Source]

    # File xmlrpc/parser.rb, line 458
          def parseMethodResponse(str)
            parser = @parser_class.new
            parser.parse(str)
            raise "No valid method response!" if parser.method_name != nil
            if parser.fault != nil
              # is a fault structure
              [false, parser.fault]
            else
              # is a normal return value
              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

[Validate]