def to_obj
    # If this is not a "entry_list" response, just return
    return @response unless @response && @response["entry_list"]
    
    objects = []
    @response["entry_list"].each do |object|
      attributes = []
      _module    = resolve_module(object)
      attributes = flatten_name_value_list(object)
      namespace = @session.namespace_const
      if namespace.const_get(_module)
        if attributes.length == 0
          raise AttributeParsingError, "response contains objects without attributes!"
        end
        objects << namespace.const_get(_module).new(attributes) 
      else
        raise InvalidModule, "#{_module} does not exist, or is not accessible"
      end
    end
    # If we only have one result, just return the object
    if objects.length == 1 && !@options[:always_return_array]
      return objects[0]
    else
      return objects
    end
  end
def to_obj
    # If this is not a "entry_list" response, just return
    return @response unless @response && @response["entry_list"]
    
    objects = []
    @response["entry_list"].each do |object|
      attributes = []
      _module    = resolve_module(object)
      attributes = flatten_name_value_list(object)
      namespace = @session.namespace_const
      if namespace.const_get(_module)
        if attributes.length == 0
          raise AttributeParsingError, "response contains objects without attributes!"
        end
        objects << namespace.const_get(_module).new(attributes) 
      else
        raise InvalidModule, "#{_module} does not exist, or is not accessible"
      end
    end
    # If we only have one result, just return the object
    if objects.length == 1 && !@options[:always_return_array]
      return objects[0]
    else
      return objects
    end
  end
Tries to instantiate and return an object with the values
 populated from the response