method

response_rpc_enc

Importance_0
v1_8_6_287 - Show latest stable - 0 notes - Class: SOAP::RPC::Router::Operation
response_rpc_enc(result, mapping_registry, opt) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/soap/rpc/router.rb, line 481
    def response_rpc_enc(result, mapping_registry, opt)
      soap_response =
        @rpc_method_factory.create_method_response(@rpc_response_qname)
      if soap_response.have_outparam?
        unless result.is_a?(Array)
          raise RPCRoutingError.new("out parameter was not returned")
        end
        outparams = {}
        i = 1
        soap_response.output_params.each do |outparam|
          outparams[outparam] = Mapping.obj2soap(result[i], mapping_registry,
            nil, opt)
          i += 1
        end
        soap_response.set_outparam(outparams)
        soap_response.retval = Mapping.obj2soap(result[0], mapping_registry,
          nil, opt)
      else
        soap_response.retval = Mapping.obj2soap(result, mapping_registry, nil,
          opt)
      end
      soap_response
    end
Register or log in to add new notes.