Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • soap/rpc/router.rb

Class/Module Index [+]

Quicksearch

SOAP::RPC::Router::Operation

Attributes

name[R]
request_style[R]
request_use[R]
response_style[R]
response_use[R]
soapaction[R]

Public Class Methods

new(soapaction, name, param_def, opt) click to toggle source
 
               # File soap/rpc/router.rb, line 342
def initialize(soapaction, name, param_def, opt)
  @soapaction = soapaction
  @name = name
  @request_style = opt[:request_style]
  @response_style = opt[:response_style]
  @request_use = opt[:request_use]
  @response_use = opt[:response_use]
  check_style(@request_style)
  check_style(@response_style)
  check_use(@request_use)
  check_use(@response_use)
  if @response_style == :rpc
    request_qname = opt[:request_qname] or raise
    @rpc_method_factory =
      RPC::SOAPMethodRequest.new(request_qname, param_def, @soapaction)
    @rpc_response_qname = opt[:response_qname]
  else
    @doc_request_qnames = []
    @doc_request_qualified = []
    @doc_response_qnames = []
    @doc_response_qualified = []
    param_def.each do |inout, paramname, typeinfo, eleinfo|
      klass, nsdef, namedef = typeinfo
      qualified = eleinfo
      case inout
      when SOAPMethod::IN
        @doc_request_qnames << XSD::QName.new(nsdef, namedef)
        @doc_request_qualified << qualified
      when SOAPMethod::OUT
        @doc_response_qnames << XSD::QName.new(nsdef, namedef)
        @doc_response_qualified << qualified
      else
        raise ArgumentError.new(
          "illegal inout definition for document style: #{inout}")
      end
    end
  end
end
            

Public Instance Methods

call(body, mapping_registry, literal_mapping_registry, opt) click to toggle source
 
               # File soap/rpc/router.rb, line 389
def call(body, mapping_registry, literal_mapping_registry, opt)
  if @request_style == :rpc
    values = request_rpc(body, mapping_registry, literal_mapping_registry,
      opt)
  else
    values = request_document(body, mapping_registry,
      literal_mapping_registry, opt)
  end
  result = receiver.method(@name.intern).call(*values)
  return result if result.is_a?(SOAPFault)
  if @response_style == :rpc
    response_rpc(result, mapping_registry, literal_mapping_registry, opt)
  else
    response_doc(result, mapping_registry, literal_mapping_registry, opt)
  end
end
            
request_default_encodingstyle() click to toggle source
 
               # File soap/rpc/router.rb, line 381
def request_default_encodingstyle
  (@request_use == :encoded) ? EncodingNamespace : LiteralNamespace
end
            
response_default_encodingstyle() click to toggle source
 
               # File soap/rpc/router.rb, line 385
def response_default_encodingstyle
  (@response_use == :encoded) ? EncodingNamespace : LiteralNamespace
end