157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
# File 'lib/soap/rpc/router.rb', line 157
def route(conn_data)
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
soap_response = default_encodingstyle = nil
begin
(headerhandler, env.)
soap_response =
op.call(env.body, @mapping_registry, @literal_mapping_registry,
create_mapping_opt)
conn_data.is_fault = true if soap_response.is_a?(SOAPFault)
default_encodingstyle = op.response_default_encodingstyle
rescue Exception => e
wsdl_fault_details = op.faults && op.faults[e.class.name]
soap_response = fault(e, wsdl_fault_details)
conn_data.is_fault = true
default_encodingstyle = nil
end
= (headerhandler)
if op.response_use.nil?
conn_data.send_string = ''
conn_data.is_nocontent = true
conn_data
else
body = SOAPBody.new(soap_response, conn_data.is_fault)
env = SOAPEnvelope.new(, body)
marshal(conn_data, env, default_encodingstyle)
end
end
|