Skip to content

Commit

Permalink
allow selecting the protocol to use when invoking the
Browse files Browse the repository at this point in the history
scaffolded method. fix bug in walking delegated container
services.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1074 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
leonbreedt committed Apr 3, 2005
1 parent 3534974 commit fcfe3fe
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
6 changes: 1 addition & 5 deletions actionwebservice/TODO
@@ -1,9 +1,5 @@
= 0.7.0
- WS Dynamic Scaffolding
* add protocol selection ability
* test with XML-RPC (namespaced method name support)

- update manual for scaffolding and functional testing
- Update manual for scaffolding and functional testing

= Refactoring
- Don't have clean way to go from SOAP Class object to the xsd:NAME type
Expand Down
2 changes: 1 addition & 1 deletion actionwebservice/lib/action_web_service/api/base.rb
Expand Up @@ -195,7 +195,7 @@ def to_s
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
Expand Down
2 changes: 1 addition & 1 deletion actionwebservice/lib/action_web_service/scaffolding.rb
Expand Up @@ -168,7 +168,7 @@ def initialize(real_container)
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
Expand Down
4 changes: 2 additions & 2 deletions actionwebservice/lib/action_web_service/struct.rb
Expand Up @@ -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,
Expand Down
@@ -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>
Expand Down

0 comments on commit fcfe3fe

Please sign in to comment.