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

In Files

  • soap/rpc/proxy.rb

Class/Module Index [+]

Quicksearch

SOAP::RPC::Proxy::Operation

Attributes

attributeformdefault[R]
elementformdefault[R]
request_style[R]
request_use[R]
response_style[R]
response_use[R]
soapaction[R]

Public Class Methods

new(soapaction, param_def, opt) click to toggle source
 
               # File soap/rpc/proxy.rb, line 282
def initialize(soapaction, param_def, opt)
  @soapaction = soapaction
  @request_style = opt[:request_style]
  @response_style = opt[:response_style]
  @request_use = opt[:request_use]
  @response_use = opt[:response_use]
  # set nil(unqualified) by default
  @elementformdefault = opt[:elementformdefault]
  @attributeformdefault = opt[:attributeformdefault]
  check_style(@request_style)
  check_style(@response_style)
  check_use(@request_use)
  check_use(@response_use)
  if @request_style == :rpc
    @rpc_request_qname = opt[:request_qname]
    if @rpc_request_qname.nil?
      raise MethodDefinitionError.new("rpc_request_qname must be given")
    end
    @rpc_method_factory =
      RPC::SOAPMethodRequest.new(@rpc_request_qname, param_def, @soapaction)
  else
    @doc_request_qnames = []
    @doc_request_qualified = []
    @doc_response_qnames = []
    @doc_response_qualified = []
    param_def.each do |inout, paramname, typeinfo, eleinfo|
      klass_not_used, nsdef, namedef = typeinfo
      qualified = eleinfo
      if namedef.nil?
        raise MethodDefinitionError.new("qname must be given")
      end
      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 MethodDefinitionError.new(
          "illegal inout definition for document style: #{inout}")
      end
    end
  end
end
            

Public Instance Methods

raise_fault(e, mapping_registry, literal_mapping_registry) click to toggle source
 
               # File soap/rpc/proxy.rb, line 352
def raise_fault(e, mapping_registry, literal_mapping_registry)
  if @response_style == :rpc
    Mapping.fault2exception(e, mapping_registry)
  else
    Mapping.fault2exception(e, literal_mapping_registry)
  end
end
            
request_body(values, mapping_registry, literal_mapping_registry, opt) click to toggle source
 
               # File soap/rpc/proxy.rb, line 336
def request_body(values, mapping_registry, literal_mapping_registry, opt)
  if @request_style == :rpc
    request_rpc(values, mapping_registry, literal_mapping_registry, opt)
  else
    request_doc(values, mapping_registry, literal_mapping_registry, opt)
  end
end
            
request_default_encodingstyle() click to toggle source
 
               # File soap/rpc/proxy.rb, line 328
def request_default_encodingstyle
  (@request_use == :encoded) ? EncodingNamespace : LiteralNamespace
end
            
response_default_encodingstyle() click to toggle source
 
               # File soap/rpc/proxy.rb, line 332
def response_default_encodingstyle
  (@response_use == :encoded) ? EncodingNamespace : LiteralNamespace
end
            
response_obj(body, mapping_registry, literal_mapping_registry, opt) click to toggle source
 
               # File soap/rpc/proxy.rb, line 344
def response_obj(body, mapping_registry, literal_mapping_registry, opt)
  if @response_style == :rpc
    response_rpc(body, mapping_registry, literal_mapping_registry, opt)
  else
    response_doc(body, mapping_registry, literal_mapping_registry, opt)
  end
end