aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib/action_web_service
diff options
context:
space:
mode:
Diffstat (limited to 'actionwebservice/lib/action_web_service')
-rw-r--r--actionwebservice/lib/action_web_service/api/base.rb2
-rw-r--r--actionwebservice/lib/action_web_service/scaffolding.rb2
-rw-r--r--actionwebservice/lib/action_web_service/struct.rb4
-rw-r--r--actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml8
4 files changed, 11 insertions, 5 deletions
diff --git a/actionwebservice/lib/action_web_service/api/base.rb b/actionwebservice/lib/action_web_service/api/base.rb
index c9fb9f967f..4548856d86 100644
--- a/actionwebservice/lib/action_web_service/api/base.rb
+++ b/actionwebservice/lib/action_web_service/api/base.rb
@@ -195,7 +195,7 @@ module ActionWebService # :nodoc:
private
def friendly_param(type, show_name=true)
name = type.name.to_s
- type_type = type.type.to_s
+ type_type = type.array?? type.element_type.type.to_s : type.type.to_s
str = type.array?? (type_type + '[]') : type_type
show_name ? (str + " " + name) : str
end
diff --git a/actionwebservice/lib/action_web_service/scaffolding.rb b/actionwebservice/lib/action_web_service/scaffolding.rb
index 0fab01eced..e0938faf66 100644
--- a/actionwebservice/lib/action_web_service/scaffolding.rb
+++ b/actionwebservice/lib/action_web_service/scaffolding.rb
@@ -168,7 +168,7 @@ module ActionWebService
if @real_container.class.web_service_dispatching_mode == :direct
@services << Service.new(@real_container.controller_name, @real_container)
else
- @real_container.class.web_services.each do |name|
+ @real_container.class.web_services.each do |name, obj|
@services << Service.new(name, @real_container.instance_eval{ web_service_object(name) })
end
end
diff --git a/actionwebservice/lib/action_web_service/struct.rb b/actionwebservice/lib/action_web_service/struct.rb
index c5e6346bfa..f2bfba9e30 100644
--- a/actionwebservice/lib/action_web_service/struct.rb
+++ b/actionwebservice/lib/action_web_service/struct.rb
@@ -16,8 +16,8 @@ module ActionWebService
# end
# person = Person.new(:id => 5, :firstname => 'john', :lastname => 'doe')
#
- # Active Record model classes are already implicitly supported for method
- # return signatures.
+ # Active Record model classes are already implicitly supported in method
+ # signatures.
class Struct
# If a Hash is given as argument to an ActionWebService::Struct constructor,
diff --git a/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml b/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml
index e62d234c1a..64548360ad 100644
--- a/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml
+++ b/actionwebservice/lib/action_web_service/templates/scaffolds/parameters.rhtml
@@ -1,9 +1,15 @@
-<h4>Method Parameters for <em><%= @scaffold_service %>#<%= @scaffold_method.public_name %></em></h4>
+<h4>Method Invocation Details for <em><%= @scaffold_service %>#<%= @scaffold_method.public_name %></em></h4>
<%= form_tag :action => @scaffold_action_name + '_submit' %>
<%= hidden_field_tag "service", @scaffold_service.name %>
<%= hidden_field_tag "method", @scaffold_method.public_name %>
+<p>
+<label for="protocol">Protocol:</label><br />
+<%= select_tag 'protocol', options_for_select([['SOAP', 'soap'], ['XML-RPC', 'xmlrpc']], @params['protocol']) %>
+</p>
+
+<strong>Method Parameters:</strong><br />
<% i = 0 %>
<% @scaffold_method.expects.each do |type| %>
<p>