From 1155ea0aa3c25b4683c6343162cd49dbe0fec094 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Tue, 5 Apr 2005 21:37:48 +0000 Subject: initial go at making :layered dispatching generate WSDL for SOAP, and have :layered process SOAP method calls correctly as well, may be unstable git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1097 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/action_web_service/dispatcher/abstract.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'actionwebservice/lib/action_web_service/dispatcher/abstract.rb') diff --git a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb index 975120212f..1d8715a8f7 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb @@ -52,9 +52,17 @@ module ActionWebService # :nodoc: invocation.protocol = request.protocol invocation.service_name = request.service_name if web_service_dispatching_mode == :layered - if request.method_name =~ /^([^\.]+)\.(.*)$/ - public_method_name = $2 - invocation.service_name = $1 + case invocation.protocol + when Protocol::Soap::SoapProtocol + soap_action = request.protocol_options[:soap_action] + if soap_action && soap_action =~ /^\/\w+\/(\w+)\// + invocation.service_name = $1 + end + when Protocol::XmlRpc::XmlRpcProtocol + if request.method_name =~ /^([^\.]+)\.(.*)$/ + public_method_name = $2 + invocation.service_name = $1 + end end end case web_service_dispatching_mode -- cgit v1.2.3