method
route

Ruby latest stable (v2_5_5)
-
0 notes -
Class: SOAP::RPC::Router
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
route(conn_data)
public
Hide source
# File lib/soap/rpc/router.rb, line 153 def route(conn_data) # we cannot set request_default_encodingsyle before parsing the content. env = unmarshal(conn_data) if env.nil? raise ArgumentError.new("illegal SOAP marshal format") end op = lookup_operation(conn_data.soapaction, env.body) headerhandler = @headerhandler.dup @headerhandlerfactory.each do |f| headerhandler.add(f.create) end receive_headers(headerhandler, env.header) soap_response = default_encodingstyle = nil begin soap_response = op.call(env.body, @mapping_registry, @literal_mapping_registry, create_mapping_opt) default_encodingstyle = op.response_default_encodingstyle rescue Exception soap_response = fault($!) default_encodingstyle = nil end conn_data.is_fault = true if soap_response.is_a?(SOAPFault) header = call_headers(headerhandler) body = SOAPBody.new(soap_response) env = SOAPEnvelope.new(header, body) marshal(conn_data, env, default_encodingstyle) end