diff options
-rw-r--r-- | actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb | 9 | ||||
-rw-r--r-- | actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb index 5289b0b84d..8a2b1d1c7d 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb @@ -38,7 +38,12 @@ module ActionWebService # :nodoc: module InstanceMethods # :nodoc: private def dispatch_web_service_request - request = discover_web_service_request(@request) + exception = nil + begin + request = discover_web_service_request(@request) + rescue Exception => e + exception = e + end if request log_request(request, @request.raw_post) response = nil @@ -57,7 +62,7 @@ module ActionWebService # :nodoc: send_web_service_response(response, bm.real) end else - exception = DispatcherError.new("Malformed SOAP or XML-RPC protocol message") + exception ||= DispatcherError.new("Malformed SOAP or XML-RPC protocol message") send_web_service_error_response(request, exception) end rescue Exception => e diff --git a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb index f3e4a23b4b..37ef16c12f 100644 --- a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb +++ b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb @@ -16,8 +16,6 @@ module ActionWebService # :nodoc: params = params.map{|x| @marshaler.unmarshal(x)} service_name = ap_request.parameters['action'] Request.new(self, method_name, params, service_name) - rescue - nil end def protocol_client(api, protocol_name, endpoint_uri, options) |