Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rename entire package to Action Web Service

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit ec03a601811587dd4265667aadd50c101c23b116 1 parent 5760a6c
@bitserf bitserf authored
Showing with 217 additions and 222 deletions.
  1. +1 −1  actionwebservice/ChangeLog
  2. +2 −2 actionwebservice/HACKING
  3. +27 −27 actionwebservice/README
  4. +11 −11 actionwebservice/Rakefile
  5. +9 −2 actionwebservice/TODO
  6. +4 −4 actionwebservice/examples/googlesearch/autoloading/google_search_api.rb
  7. +5 −5 actionwebservice/examples/googlesearch/delegated/google_search_service.rb
  8. +4 −4 actionwebservice/examples/googlesearch/direct/google_search_api.rb
  9. +2 −14 actionwebservice/examples/metaWeblog/README
  10. +5 −5 actionwebservice/examples/metaWeblog/blog_controller.rb
  11. +0 −2  actionwebservice/lib/action_service/api.rb
  12. +0 −3  actionwebservice/lib/action_service/client.rb
  13. +0 −4 actionwebservice/lib/action_service/protocol.rb
  14. +0 −2  actionwebservice/lib/action_service/router.rb
  15. +19 −19 actionwebservice/lib/{action_service.rb → action_web_service.rb}
  16. +2 −0  actionwebservice/lib/action_web_service/api.rb
  17. +14 −14 actionwebservice/lib/{action_service → action_web_service}/api/abstract.rb
  18. +1 −1  actionwebservice/lib/{action_service → action_web_service}/api/action_controller.rb
  19. +7 −7 actionwebservice/lib/{action_service → action_web_service}/base.rb
  20. +3 −0  actionwebservice/lib/action_web_service/client.rb
  21. +1 −1  actionwebservice/lib/{action_service → action_web_service}/client/base.rb
  22. +7 −7 actionwebservice/lib/{action_service → action_web_service}/client/soap.rb
  23. +4 −4 actionwebservice/lib/{action_service → action_web_service}/client/xmlrpc.rb
  24. +8 −8 actionwebservice/lib/{action_service → action_web_service}/container.rb
  25. +5 −5 actionwebservice/lib/{action_service → action_web_service}/invocation.rb
  26. +4 −0 actionwebservice/lib/action_web_service/protocol.rb
  27. +2 −2 actionwebservice/lib/{action_service → action_web_service}/protocol/abstract.rb
  28. +2 −2 actionwebservice/lib/{action_service → action_web_service}/protocol/registry.rb
  29. +5 −5 actionwebservice/lib/{action_service → action_web_service}/protocol/soap.rb
  30. +4 −4 actionwebservice/lib/{action_service → action_web_service}/protocol/xmlrpc.rb
  31. +2 −0  actionwebservice/lib/action_web_service/router.rb
  32. +4 −4 actionwebservice/lib/{action_service → action_web_service}/router/action_controller.rb
  33. +4 −4 actionwebservice/lib/{action_service → action_web_service}/router/wsdl.rb
  34. +6 −6 actionwebservice/lib/{action_service → action_web_service}/struct.rb
  35. 0  actionwebservice/lib/{action_service → action_web_service}/support/class_inheritable_options.rb
  36. +4 −4 actionwebservice/lib/{action_service → action_web_service}/support/signature.rb
  37. +2 −2 actionwebservice/test/abstract_client.rb
  38. +1 −1  actionwebservice/test/abstract_soap.rb
  39. +1 −1  actionwebservice/test/abstract_unit.rb
  40. +1 −1  actionwebservice/test/api_test.rb
  41. +4 −4 actionwebservice/test/base_test.rb
  42. +1 −1  actionwebservice/test/client_soap_test.rb
  43. +1 −1  actionwebservice/test/client_xmlrpc_test.rb
  44. +3 −3 actionwebservice/test/invocation_test.rb
  45. +4 −4 actionwebservice/test/protocol_registry_test.rb
  46. +7 −7 actionwebservice/test/protocol_soap_test.rb
  47. +7 −7 actionwebservice/test/protocol_xmlrpc_test.rb
  48. +3 −3 actionwebservice/test/router_action_controller_test.rb
  49. +3 −3 actionwebservice/test/router_wsdl_test.rb
  50. +1 −1  actionwebservice/test/struct_test.rb
View
2  actionwebservice/ChangeLog
@@ -31,7 +31,7 @@ UNRELEASED
* lib/action_service/*, test/*: extensive refactoring: define API methods in
a seperate class, and specify it wherever used with 'service_api'.
this makes writing a client API for accessing defined API methods
- with ActionService really easy.
+ with ActionWebService really easy.
* lib/action_service/container.rb: fix a bug in default call
handling for direct dispatching, and add ActionController filter
support for direct dispatching.
View
4 actionwebservice/HACKING
@@ -34,10 +34,10 @@ the protocol implementations.
== Adding support for a new protocol
- 1. Add an ActionService::Protocol::YourProtocol module and any classes you need to
+ 1. Add an ActionWebService::Protocol::YourProtocol module and any classes you need to
perform unmarshaling/marshaling of protocol requests. See the SOAP implementation
for an example of a complex mapping, and also see
- ActionService::Protocol::AbstractProtocol for the methods you need to implement.
+ ActionWebService::Protocol::AbstractProtocol for the methods you need to implement.
2. Add unit tests for your new protocol. Be sure to test using a Action Pack test request
duplicating how the real requests will arrive and verify that mapping to and from Ruby
View
54 actionwebservice/README
@@ -1,6 +1,6 @@
-= Action Service -- Serving APIs on rails
+= Action Web Service -- Serving APIs on rails
-Action Service provides a way to publish interoperable web service APIs with
+Action Web Service provides a way to publish interoperable web service APIs with
Rails without spending a lot of time delving into protocol details.
@@ -10,7 +10,7 @@ Rails without spending a lot of time delving into protocol details.
* Dynamic WSDL generation for APIs
* XML-RPC protocol support
* Clients that use the same API definitions as the server for
- easy interoperability with other Action Service based applications
+ easy interoperability with other Action Web Service based applications
* Type signature hints to improve interoperability with static languages
* Active Record model class support in signatures
@@ -18,7 +18,7 @@ Rails without spending a lot of time delving into protocol details.
== Defining your APIs
You specify the methods you want to make available as API methods in an
-ActionService::API::Base derivative, and then specify this API
+ActionWebService::API::Base derivative, and then specify this API
definition class wherever you want to use that API.
The implementation of the methods is done seperately to the API
@@ -27,14 +27,14 @@ specification.
==== Method name inflection
-Action Service will camelcase the method names according to Rails Inflector
+Action Web Service will camelcase the method names according to Rails Inflector
rules for the API visible to public callers. What this means, for example
is that the method names in generated WSDL will be camelcased, and callers will
have to supply the camelcased name in their requests for the request to
succeed.
If you do not desire this behaviour, you can turn it off with the
-ActionService::API::Base +inflect_names+ option.
+ActionWebService::API::Base +inflect_names+ option.
==== Inflection examples
@@ -45,14 +45,14 @@ ActionService::API::Base +inflect_names+ option.
==== Disabling inflection
- class PersonAPI < ActionService::API::Base
+ class PersonAPI < ActionWebService::API::Base
inflect_names false
end
==== API definition example
- class PersonAPI < ActionService::API::Base
+ class PersonAPI < ActionWebService::API::Base
api_method :add, :expects => [:string, :string, :bool], :returns => [:int]
api_method :remove, :expects => [:int], :returns => [:bool]
end
@@ -72,7 +72,7 @@ ActionService::API::Base +inflect_names+ option.
== Publishing your APIs
-Action Service uses Action Pack to process protocol requests. There are two
+Action Web Service uses Action Pack to process protocol requests. There are two
modes of dispatching protocol requests, _Direct_, and _Delegated_.
@@ -102,7 +102,7 @@ overridden.</em>
end
end
- class PersonAPI < ActionService::API::Base
+ class PersonAPI < ActionWebService::API::Base
...
end
@@ -117,7 +117,7 @@ This mode can be turned on by setting the +web_service_dispatching_mode+ option
in a controller.
In this mode, the controller contains one or more web service objects (objects
-that implement an ActionService::API::Base definition). These web service
+that implement an ActionWebService::API::Base definition). These web service
objects are each mapped onto one controller action only.
==== Delegated dispatching example
@@ -128,7 +128,7 @@ objects are each mapped onto one controller action only.
web_service :person, PersonService.new
end
- class PersonService < ActionService::Base
+ class PersonService < ActionWebService::Base
web_service_api PersonAPI
def add
@@ -138,7 +138,7 @@ objects are each mapped onto one controller action only.
end
end
- class PersonAPI < ActionService::API::Base
+ class PersonAPI < ActionWebService::API::Base
...
end
@@ -150,23 +150,23 @@ The <tt>/api/person</tt> action is generated when the +web_service+
method is called. <em>This action must not be overridden.</em>
Other controller actions (actions that aren't the target of a +web_service+ call)
-are ignored for ActionService purposes, and can do normal action tasks.
+are ignored for ActionWebService purposes, and can do normal action tasks.
== Using the client support
-Action Service includes client classes that can use the same API
+Action Web Service includes client classes that can use the same API
definition as the server. The advantage of this approach is that your client
will have the same support for Active Record and structured types as the
server, and can just use them directly, and rely on the marshaling to Do The
Right Thing.
*Note*: The client support is intended for communication between Ruby on Rails
-applications that both use Action Service. It may work with other servers, but
+applications that both use Action Web Service. It may work with other servers, but
that is not its intended use, and interoperability can't be guaranteed, especially
not for .NET web services.
-Web services protocol specifications are complex, and Action Service client
+Web services protocol specifications are complex, and Action Web Service client
support can only be guaranteed to work with a subset.
@@ -180,31 +180,31 @@ support can only be guaranteed to work with a subset.
web_client_api :google, :soap, 'http://url/to/blog/api/beta', :service_name => 'GoogleSearch'
end
-See ActionService::API::ActionController::ClassMethods for more details.
+See ActionWebService::API::ActionController::ClassMethods for more details.
==== Manually created client example
- class PersonAPI < ActionService::API::Base
+ class PersonAPI < ActionWebService::API::Base
api_method :find_all, :returns => [[Person]]
end
- soap_client = ActionService::Client::Soap.new(PersonAPI, "http://...")
+ soap_client = ActionWebService::Client::Soap.new(PersonAPI, "http://...")
persons = soap_client.find_all
- class BloggerAPI < ActionService::API::Base
+ class BloggerAPI < ActionWebService::API::Base
inflect_names false
api_method :getRecentPosts, :returns => [[Blog::Post]]
end
- blog = ActionService::Client::XmlRpc.new(BloggerAPI, "http://.../xmlrpc", :handler_name => "blogger")
+ blog = ActionWebService::Client::XmlRpc.new(BloggerAPI, "http://.../xmlrpc", :handler_name => "blogger")
posts = blog.getRecentPosts
-See ActionService::Client::Soap and ActionService::Client::XmlRpc for more details.
+See ActionWebService::Client::Soap and ActionWebService::Client::XmlRpc for more details.
== Dependencies
-Action Service requires that the Action Pack and Active Record are either
+Action Web Service requires that the Action Pack and Active Record are either
available to be required immediately or are accessible as GEMs.
It also requires a version of Ruby that includes SOAP support in the standard
@@ -214,20 +214,20 @@ is the version tested against.
== Download
-The latest Action Service version can be downloaded from
+The latest Action Web Service version can be downloaded from
http://rubyforge.org/projects/actionservice
== Installation
-You can install Action Service with the following command.
+You can install Action Web Service with the following command.
% [sudo] ruby setup.rb
== License
-Action Service is released under the MIT license.
+Action Web Service is released under the MIT license.
== Support
View
22 actionwebservice/Rakefile
@@ -8,7 +8,7 @@ require 'rake/contrib/rubyforgepublisher'
require 'fileutils'
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
-PKG_NAME = 'actionservice'
+PKG_NAME = 'actionwebservice'
PKG_VERSION = '0.4.0' + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}"
@@ -28,16 +28,16 @@ Rake::TestTask.new { |t|
# Generate the RDoc documentation
Rake::RDocTask.new { |rdoc|
rdoc.rdoc_dir = 'doc'
- rdoc.title = "Action Service -- Web services for Action Pack"
+ rdoc.title = "Action Web Service -- Web services for Action Pack"
rdoc.options << '--line-numbers --inline-source --main README --accessor class_inheritable_option=RW'
rdoc.rdoc_files.include('README')
- rdoc.rdoc_files.include('lib/action_service.rb')
- rdoc.rdoc_files.include('lib/action_service/*.rb')
- rdoc.rdoc_files.include('lib/action_service/api/*.rb')
- rdoc.rdoc_files.include('lib/action_service/client/*.rb')
- rdoc.rdoc_files.include('lib/action_service/protocol/*.rb')
- rdoc.rdoc_files.include('lib/action_service/router/*.rb')
- rdoc.rdoc_files.include('lib/action_service/support/*.rb')
+ rdoc.rdoc_files.include('lib/action_web_service.rb')
+ rdoc.rdoc_files.include('lib/action_web_service/*.rb')
+ rdoc.rdoc_files.include('lib/action_web_service/api/*.rb')
+ rdoc.rdoc_files.include('lib/action_web_service/client/*.rb')
+ rdoc.rdoc_files.include('lib/action_web_service/protocol/*.rb')
+ rdoc.rdoc_files.include('lib/action_web_service/router/*.rb')
+ rdoc.rdoc_files.include('lib/action_web_service/support/*.rb')
}
@@ -61,7 +61,7 @@ spec = Gem::Specification.new do |s|
s.has_rdoc = true
s.requirements << 'none'
s.require_path = 'lib'
- s.autorequire = 'action_service'
+ s.autorequire = 'action_web_service'
s.files = [ "Rakefile", "setup.rb", "README", "TODO", "HACKING", "ChangeLog", "MIT-LICENSE" ]
s.files = s.files + Dir.glob( "examples/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
@@ -93,7 +93,7 @@ def each_source_file(*args)
prefix, includes, excludes, open_file = args
prefix ||= File.dirname(__FILE__)
open_file = true if open_file.nil?
- includes ||= %w[lib\/action_service\.rb$ lib\/action_service\/.*\.rb$]
+ includes ||= %w[lib\/action_web_service\.rb$ lib\/action_web_service\/.*\.rb$]
excludes ||= %w[]
Find.find(prefix) do |file_name|
next if file_name =~ /\.svn/
View
11 actionwebservice/TODO
@@ -8,7 +8,7 @@
- support XML-RPC's "handler." method namespacing. perhaps something like:
- class BloggingServices < ActionService::LayeredService
+ class BloggingServices < ActionWebService::LayeredService
def initialize(request)
@request = controller.request
end
@@ -23,6 +23,13 @@
web_service :xmlrpc { BloggingServices.new(@request) }
end
+ - supported namespaced custom types in WSDL in a way that interoperates
+ with .NET (.NET croaks on '::' currently)
+
+ - simplification: collapse Router::ActionController, Router::Wsdl
+ and API::ActionController into Container::ActionController.
+ the seperation has gained us nothing.
+
= Low priority tasks
- add better type mapping tests for XML-RPC
- add tests for ActiveRecord support (with mock objects?)
@@ -31,7 +38,7 @@
- Find an alternative way to map interesting types for SOAP (like ActiveRecord
model classes) that doesn't require creation of a sanitized copy object with data
copied from the real one. Ideally this would let us get rid of
- ActionService::Struct altogether and provide a block that would yield the
+ ActionWebService::Struct altogether and provide a block that would yield the
attributes and values. "Filters" ? Not sure how to integrate with SOAP though.
- Don't have clean way to go from SOAP Class object to the xsd:NAME type
View
8 actionwebservice/examples/googlesearch/autoloading/google_search_api.rb
@@ -1,9 +1,9 @@
-class DirectoryCategory < ActionService::Struct
+class DirectoryCategory < ActionWebService::Struct
member :fullViewableName, :string
member :specialEncoding, :string
end
-class ResultElement < ActionService::Struct
+class ResultElement < ActionWebService::Struct
member :summary, :string
member :URL, :string
member :snippet, :string
@@ -15,7 +15,7 @@ class ResultElement < ActionService::Struct
member :directoryTitle, :string
end
-class GoogleSearchResult < ActionService::Struct
+class GoogleSearchResult < ActionWebService::Struct
member :documentFiltering, :bool
member :searchComments, :string
member :estimatedTotalResultsCount, :int
@@ -29,7 +29,7 @@ class GoogleSearchResult < ActionService::Struct
member :searchTime, :float
end
-class GoogleSearchAPI < ActionService::API::Base
+class GoogleSearchAPI < ActionWebService::API::Base
inflect_names false
api_method :doGetCachedPage, :returns => [:string], :expects => [{:key=>:string}, {:url=>:string}]
View
10 actionwebservice/examples/googlesearch/delegated/google_search_service.rb
@@ -1,9 +1,9 @@
-class DirectoryCategory < ActionService::Struct
+class DirectoryCategory < ActionWebService::Struct
member :fullViewableName, :string
member :specialEncoding, :string
end
-class ResultElement < ActionService::Struct
+class ResultElement < ActionWebService::Struct
member :summary, :string
member :URL, :string
member :snippet, :string
@@ -15,7 +15,7 @@ class ResultElement < ActionService::Struct
member :directoryTitle, :string
end
-class GoogleSearchResult < ActionService::Struct
+class GoogleSearchResult < ActionWebService::Struct
member :documentFiltering, :bool
member :searchComments, :string
member :estimatedTotalResultsCount, :int
@@ -29,7 +29,7 @@ class GoogleSearchResult < ActionService::Struct
member :searchTime, :float
end
-class GoogleSearchAPI < ActionService::API::Base
+class GoogleSearchAPI < ActionWebService::API::Base
inflect_names false
api_method :doGetCachedPage, :returns => [:string], :expects => [{:key=>:string}, {:url=>:string}]
@@ -49,7 +49,7 @@ class GoogleSearchAPI < ActionService::API::Base
]
end
-class GoogleSearchService < ActionService::Base
+class GoogleSearchService < ActionWebService::Base
web_service_api GoogleSearchAPI
def doGetCachedPage(key, url)
View
8 actionwebservice/examples/googlesearch/direct/google_search_api.rb
@@ -1,9 +1,9 @@
-class DirectoryCategory < ActionService::Struct
+class DirectoryCategory < ActionWebService::Struct
member :fullViewableName, :string
member :specialEncoding, :string
end
-class ResultElement < ActionService::Struct
+class ResultElement < ActionWebService::Struct
member :summary, :string
member :URL, :string
member :snippet, :string
@@ -15,7 +15,7 @@ class ResultElement < ActionService::Struct
member :directoryTitle, :string
end
-class GoogleSearchResult < ActionService::Struct
+class GoogleSearchResult < ActionWebService::Struct
member :documentFiltering, :bool
member :searchComments, :string
member :estimatedTotalResultsCount, :int
@@ -29,7 +29,7 @@ class GoogleSearchResult < ActionService::Struct
member :searchTime, :float
end
-class GoogleSearchAPI < ActionService::API::Base
+class GoogleSearchAPI < ActionWebService::API::Base
inflect_names false
api_method :doGetCachedPage, :returns => [:string], :expects => [{:key=>:string}, {:url=>:string}]
View
16 actionwebservice/examples/metaWeblog/README
@@ -8,21 +8,9 @@ blogging application.
= Running
- 1. Ensure you have the 'actionservice' Gem installed. You can generate it using
- this command:
+ 1. Copy blog_controller.rb to "app/controllers" in a Rails project.
- $ rake package
-
- 2. Edit config/environment.rb, and add the following line after the rest of the
- require_gem statements:
-
- require_gem 'actionservice'
-
-
- 3. Copy blog_controller.rb to "app/controllers" in a Rails project.
-
-
- 4. Fire up a desktop blogging application (such as BloGTK on Linux),
+ 2. Fire up a desktop blogging application (such as BloGTK on Linux),
point it at http://localhost:3000/blog/api, and try creating or
editing blog posts.
View
10 actionwebservice/examples/metaWeblog/blog_controller.rb
@@ -4,18 +4,18 @@
# structures as defined by the metaWeblog/blogger
# specifications.
module Blog
- class Enclosure < ActionService::Struct
+ class Enclosure < ActionWebService::Struct
member :url, :string
member :length, :int
member :type, :string
end
- class Source < ActionService::Struct
+ class Source < ActionWebService::Struct
member :url, :string
member :name, :string
end
- class Post < ActionService::Struct
+ class Post < ActionWebService::Struct
member :title, :string
member :link, :string
member :description, :string
@@ -28,7 +28,7 @@ class Post < ActionService::Struct
member :source, Source
end
- class Blog < ActionService::Struct
+ class Blog < ActionWebService::Struct
member :url, :string
member :blogid, :string
member :blogName, :string
@@ -36,7 +36,7 @@ class Blog < ActionService::Struct
end
# skeleton metaWeblog API
-class MetaWeblogAPI < ActionService::API::Base
+class MetaWeblogAPI < ActionWebService::API::Base
inflect_names false
api_method :newPost, :returns => [:string], :expects => [
View
2  actionwebservice/lib/action_service/api.rb
@@ -1,2 +0,0 @@
-require 'action_service/api/abstract'
-require 'action_service/api/action_controller'
View
3  actionwebservice/lib/action_service/client.rb
@@ -1,3 +0,0 @@
-require 'action_service/client/base'
-require 'action_service/client/soap'
-require 'action_service/client/xmlrpc'
View
4 actionwebservice/lib/action_service/protocol.rb
@@ -1,4 +0,0 @@
-require 'action_service/protocol/abstract'
-require 'action_service/protocol/registry'
-require 'action_service/protocol/soap'
-require 'action_service/protocol/xmlrpc'
View
2  actionwebservice/lib/action_service/router.rb
@@ -1,2 +0,0 @@
-require 'action_service/router/action_controller'
-require 'action_service/router/wsdl'
View
38 actionwebservice/lib/action_service.rb → actionwebservice/lib/action_web_service.rb
@@ -34,27 +34,27 @@
$:.unshift(File.dirname(__FILE__))
-require 'action_service/base'
-require 'action_service/client'
-require 'action_service/invocation'
-require 'action_service/api'
-require 'action_service/struct'
-require 'action_service/container'
-require 'action_service/protocol'
-require 'action_service/router'
+require 'action_web_service/base'
+require 'action_web_service/client'
+require 'action_web_service/invocation'
+require 'action_web_service/api'
+require 'action_web_service/struct'
+require 'action_web_service/container'
+require 'action_web_service/protocol'
+require 'action_web_service/router'
-ActionService::Base.class_eval do
- include ActionService::API
- include ActionService::Invocation
+ActionWebService::Base.class_eval do
+ include ActionWebService::API
+ include ActionWebService::Invocation
end
ActionController::Base.class_eval do
- include ActionService::Container
- include ActionService::Protocol::Registry
- include ActionService::Protocol::Soap
- include ActionService::Protocol::XmlRpc
- include ActionService::API
- include ActionService::API::ActionController
- include ActionService::Router::ActionController
- include ActionService::Router::Wsdl
+ include ActionWebService::Container
+ include ActionWebService::Protocol::Registry
+ include ActionWebService::Protocol::Soap
+ include ActionWebService::Protocol::XmlRpc
+ include ActionWebService::API
+ include ActionWebService::API::ActionController
+ include ActionWebService::Router::ActionController
+ include ActionWebService::Router::Wsdl
end
View
2  actionwebservice/lib/action_web_service/api.rb
@@ -0,0 +1,2 @@
+require 'action_web_service/api/abstract'
+require 'action_web_service/api/action_controller'
View
28 ...ervice/lib/action_service/api/abstract.rb → ...ce/lib/action_web_service/api/abstract.rb
@@ -1,6 +1,6 @@
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module API # :nodoc:
- class APIError < ActionService::ActionServiceError # :nodoc:
+ class APIError < ActionWebService::ActionWebServiceError # :nodoc:
end
def self.append_features(base) # :nodoc:
@@ -9,10 +9,10 @@ def self.append_features(base) # :nodoc:
end
module ClassMethods
- # Attaches ActionService API +definition+ to the calling class.
+ # Attaches ActionWebService API +definition+ to the calling class.
#
# Action Controllers can have a default associated API, removing the need
- # to call this method if you follow the Action Service naming conventions.
+ # to call this method if you follow the Action Web Service naming conventions.
#
# A controller with a class name of GoogleSearchController will
# implicitly load <tt>app/apis/google_search_api.rb</tt>, and expect the
@@ -21,11 +21,11 @@ module ClassMethods
#
# ==== Service class example
#
- # class MyService < ActionService::Base
+ # class MyService < ActionWebService::Base
# web_service_api MyAPI
# end
#
- # class MyAPI < ActionService::API::Base
+ # class MyAPI < ActionWebService::API::Base
# ...
# end
#
@@ -35,7 +35,7 @@ module ClassMethods
# web_service_api MyAPI
# end
#
- # class MyAPI < ActionService::API::Base
+ # class MyAPI < ActionWebService::API::Base
# ...
# end
def web_service_api(definition=nil)
@@ -72,7 +72,7 @@ def call_web_service_api_callbacks(container_class, definition)
# It is not intended to be instantiated.
#
# It is attached to web service implementation classes like
- # ActionService::Base and ActionController::Base derivatives by using
+ # ActionWebService::Base and ActionController::Base derivatives by using
# ClassMethods#web_service_api.
class Base
# Whether to transform the public API method names into camel-cased names
@@ -87,7 +87,7 @@ class Base
private_class_method :new, :allocate
class << self
- include ActionService::Signature
+ include ActionWebService::Signature
# API methods have a +name+, which must be the Ruby method name to use when
# performing the invocation on the web service object.
@@ -98,11 +98,11 @@ class << self
# A signature is an array of one or more parameter specifiers.
# A parameter specifier can be one of the following:
#
- # * A symbol or string of representing one of the Action Service base types.
- # See ActionService::Signature for a canonical list of the base types.
+ # * A symbol or string of representing one of the Action Web Service base types.
+ # See ActionWebService::Signature for a canonical list of the base types.
# * The Class object of the parameter type
# * A single-element Array containing one of the two preceding items. This
- # will cause Action Service to treat the parameter at that position
+ # will cause Action Web Service to treat the parameter at that position
# as an array containing only values of the given type.
# * A Hash containing as key the name of the parameter, and as value
# one of the three preceding items
@@ -132,7 +132,7 @@ def api_method(name, options={})
klass = signature_parameter_class(param)
klass = klass[0] if klass.is_a?(Array)
if klass.ancestors.include?(ActiveRecord::Base)
- raise(ActionServiceError, "ActiveRecord model classes not allowed in :expects")
+ raise(ActionWebServiceError, "ActiveRecord model classes not allowed in :expects")
end
end
end
@@ -182,7 +182,7 @@ def api_public_method_names
def validate_options(valid_option_keys, supplied_option_keys)
unknown_option_keys = supplied_option_keys - valid_option_keys
unless unknown_option_keys.empty?
- raise(ActionServiceError, "Unknown options: #{unknown_option_keys}")
+ raise(ActionWebServiceError, "Unknown options: #{unknown_option_keys}")
end
end
View
2  ...b/action_service/api/action_controller.rb → ...tion_web_service/api/action_controller.rb
@@ -1,4 +1,4 @@
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module API # :nodoc:
module ActionController # :nodoc:
def self.append_features(base) # :nodoc:
View
14 actionwebservice/lib/action_service/base.rb → ...webservice/lib/action_web_service/base.rb
@@ -1,17 +1,17 @@
-require 'action_service/support/class_inheritable_options'
-require 'action_service/support/signature'
+require 'action_web_service/support/class_inheritable_options'
+require 'action_web_service/support/signature'
-module ActionService # :nodoc:
- class ActionServiceError < StandardError # :nodoc:
+module ActionWebService # :nodoc:
+ class ActionWebServiceError < StandardError # :nodoc:
end
- # An Action Service object implements a specified API.
+ # An Action Web Service object implements a specified API.
#
# Used by controllers operating in _Delegated_ dispatching mode.
#
# ==== Example
#
- # class PersonService < ActionService::Base
+ # class PersonService < ActionWebService::Base
# web_service_api PersonAPI
#
# def find_person(criteria)
@@ -23,7 +23,7 @@ class ActionServiceError < StandardError # :nodoc:
# end
# end
#
- # class PersonAPI < ActionService::API::Base
+ # class PersonAPI < ActionWebService::API::Base
# api_method :find_person, :expects => [SearchCriteria], :returns => [[Person]]
# api_method :delete_person, :expects => [:int]
# end
View
3  actionwebservice/lib/action_web_service/client.rb
@@ -0,0 +1,3 @@
+require 'action_web_service/client/base'
+require 'action_web_service/client/soap'
+require 'action_web_service/client/xmlrpc'
View
2  ...service/lib/action_service/client/base.rb → ...ice/lib/action_web_service/client/base.rb
@@ -1,4 +1,4 @@
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Client # :nodoc:
class ClientError < StandardError # :nodoc:
end
View
14 ...service/lib/action_service/client/soap.rb → ...ice/lib/action_web_service/client/soap.rb
@@ -1,25 +1,25 @@
require 'soap/rpc/driver'
require 'uri'
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Client # :nodoc:
# Implements SOAP client support (using RPC encoding for the messages).
#
# ==== Example Usage
#
- # class PersonAPI < ActionService::API::Base
+ # class PersonAPI < ActionWebService::API::Base
# api_method :find_all, :returns => [[Person]]
# end
#
- # soap_client = ActionService::Client::Soap.new(PersonAPI, "http://...")
+ # soap_client = ActionWebService::Client::Soap.new(PersonAPI, "http://...")
# persons = soap_client.find_all
#
class Soap < Base
# Creates a new web service client using the SOAP RPC protocol.
#
- # +api+ must be an ActionService::API::Base derivative, and
+ # +api+ must be an ActionWebService::API::Base derivative, and
# +endpoint_uri+ must point at the relevant URL to which protocol requests
# will be sent with HTTP POST.
#
@@ -28,10 +28,10 @@ class Soap < Base
# option, you must specify it here
def initialize(api, endpoint_uri, options={})
super(api, endpoint_uri)
- @service_name = options[:service_name] || 'ActionService'
+ @service_name = options[:service_name] || 'ActionWebService'
@namespace = "urn:#{@service_name}"
- @mapper = ActionService::Protocol::Soap::SoapMapper.new(@namespace)
- @protocol = ActionService::Protocol::Soap::SoapProtocol.new(@mapper)
+ @mapper = ActionWebService::Protocol::Soap::SoapMapper.new(@namespace)
+ @protocol = ActionWebService::Protocol::Soap::SoapProtocol.new(@mapper)
@soap_action_base = options[:soap_action_base]
@soap_action_base ||= URI.parse(endpoint_uri).path
@driver = create_soap_rpc_driver(api, endpoint_uri)
View
8 ...rvice/lib/action_service/client/xmlrpc.rb → ...e/lib/action_web_service/client/xmlrpc.rb
@@ -1,25 +1,25 @@
require 'uri'
require 'xmlrpc/client'
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Client # :nodoc:
# Implements XML-RPC client support
#
# ==== Example Usage
#
- # class BloggerAPI < ActionService::API::Base
+ # class BloggerAPI < ActionWebService::API::Base
# inflect_names false
# api_method :getRecentPosts, :returns => [[Blog::Post]]
# end
#
- # blog = ActionService::Client::XmlRpc.new(BloggerAPI, "http://.../RPC", :handler_name => "blogger")
+ # blog = ActionWebService::Client::XmlRpc.new(BloggerAPI, "http://.../RPC", :handler_name => "blogger")
# posts = blog.getRecentPosts
class XmlRpc < Base
# Creates a new web service client using the XML-RPC protocol.
#
- # +api+ must be an ActionService::API::Base derivative, and
+ # +api+ must be an ActionWebService::API::Base derivative, and
# +endpoint_uri+ must point at the relevant URL to which protocol requests
# will be sent with HTTP POST.
#
View
16 ...ebservice/lib/action_service/container.rb → ...rvice/lib/action_web_service/container.rb
@@ -1,6 +1,6 @@
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Container # :nodoc:
- class ContainerError < ActionService::ActionServiceError # :nodoc:
+ class ContainerError < ActionWebService::ActionWebServiceError # :nodoc:
end
def self.append_features(base) # :nodoc:
@@ -8,12 +8,12 @@ def self.append_features(base) # :nodoc:
base.class_inheritable_option(:web_service_dispatching_mode, :direct)
base.class_inheritable_option(:web_service_exception_reporting, true)
base.extend(ClassMethods)
- base.send(:include, ActionService::Container::InstanceMethods)
+ base.send(:include, ActionWebService::Container::InstanceMethods)
end
module ClassMethods
# Declares a web service that will provides access to the API of the given
- # +object+. +object+ must be an ActionService::Base derivative.
+ # +object+. +object+ must be an ActionWebService::Base derivative.
#
# Web service object creation can either be _immediate_, where the object
# instance is given at class definition time, or _deferred_, where
@@ -171,8 +171,8 @@ def dispatch_delegated_web_service_request(protocol_request)
public_method_name = protocol_request.public_method_name
method_name = api.api_method_name(public_method_name)
- invocation = ActionService::Invocation::InvocationRequest.new(
- ActionService::Invocation::ConcreteInvocation,
+ invocation = ActionWebService::Invocation::InvocationRequest.new(
+ ActionWebService::Invocation::ConcreteInvocation,
public_method_name,
method_name)
@@ -184,7 +184,7 @@ def dispatch_delegated_web_service_request(protocol_request)
invocation.params = protocol_request.unmarshal
else
protocol_request.type = Protocol::UncheckedMessage
- invocation.type = ActionService::Invocation::VirtualInvocation
+ invocation.type = ActionWebService::Invocation::VirtualInvocation
system_methods = self.class.read_inheritable_attribute('default_system_methods') || {}
protocol = protocol_request.protocol
block = system_methods[protocol.class]
@@ -219,7 +219,7 @@ def dispatch_delegated_web_service_request(protocol_request)
protocol_request.type = Protocol::UncheckedMessage
invocation.params = protocol_request.unmarshal
invocation.method_name = method_name.to_sym
- invocation.type = ActionService::Invocation::UnpublishedConcreteInvocation
+ invocation.type = ActionWebService::Invocation::UnpublishedConcreteInvocation
else
raise(ContainerError, "no such method /#{web_service_name}##{public_method_name}")
end
View
10 ...bservice/lib/action_service/invocation.rb → ...vice/lib/action_web_service/invocation.rb
@@ -1,20 +1,20 @@
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Invocation # :nodoc:
ConcreteInvocation = :concrete
VirtualInvocation = :virtual
UnpublishedConcreteInvocation = :unpublished_concrete
- class InvocationError < ActionService::ActionServiceError # :nodoc:
+ class InvocationError < ActionWebService::ActionWebServiceError # :nodoc:
end
def self.append_features(base) # :nodoc:
super
base.extend(ClassMethods)
- base.send(:include, ActionService::Invocation::InstanceMethods)
+ base.send(:include, ActionWebService::Invocation::InstanceMethods)
end
# Invocation interceptors provide a means to execute custom code before
- # and after method invocations on ActionService::Base objects.
+ # and after method invocations on ActionWebService::Base objects.
#
# When running in _Direct_ dispatching mode, ActionController filters
# should be used for this functionality instead.
@@ -28,7 +28,7 @@ def self.append_features(base) # :nodoc:
#
# === Example
#
- # class CustomService < ActionService::Base
+ # class CustomService < ActionWebService::Base
# before_invocation :intercept_add, :only => [:add]
#
# def add(a, b)
View
4 actionwebservice/lib/action_web_service/protocol.rb
@@ -0,0 +1,4 @@
+require 'action_web_service/protocol/abstract'
+require 'action_web_service/protocol/registry'
+require 'action_web_service/protocol/soap'
+require 'action_web_service/protocol/xmlrpc'
View
4 ...e/lib/action_service/protocol/abstract.rb → ...b/action_web_service/protocol/abstract.rb
@@ -1,9 +1,9 @@
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Protocol # :nodoc:
CheckedMessage = :checked
UncheckedMessage = :unchecked
- class ProtocolError < ActionService::ActionServiceError # :nodoc:
+ class ProtocolError < ActionWebService::ActionWebServiceError # :nodoc:
end
class AbstractProtocol # :nodoc:
View
4 ...e/lib/action_service/protocol/registry.rb → ...b/action_web_service/protocol/registry.rb
@@ -1,4 +1,4 @@
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Protocol # :nodoc:
HeaderAndBody = :header_and_body
BodyOnly = :body_only
@@ -7,7 +7,7 @@ module Registry # :nodoc:
def self.append_features(base) # :nodoc:
super
base.extend(ClassMethods)
- base.send(:include, ActionService::Protocol::Registry::InstanceMethods)
+ base.send(:include, ActionWebService::Protocol::Registry::InstanceMethods)
end
module ClassMethods # :nodoc:
View
10 ...rvice/lib/action_service/protocol/soap.rb → ...e/lib/action_web_service/protocol/soap.rb
@@ -5,17 +5,17 @@
require 'xsd/ns'
require 'singleton'
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Protocol # :nodoc:
module Soap # :nodoc:
- class ProtocolError < ActionService::ActionServiceError # :nodoc:
+ class ProtocolError < ActionWebService::ActionWebServiceError # :nodoc:
end
def self.append_features(base) # :nodoc:
super
base.register_protocol(HeaderAndBody, SoapProtocol)
base.extend(ClassMethods)
- base.wsdl_service_name('ActionService')
+ base.wsdl_service_name('ActionWebService')
end
module ClassMethods
@@ -60,7 +60,7 @@ def self.create_protocol_request(container_class, action_pack_request)
def self.create_protocol_client(api, protocol_name, endpoint_uri, options)
return nil unless protocol_name.to_s.downcase.to_sym == :soap
- ActionService::Client::Soap.new(api, endpoint_uri, options)
+ ActionWebService::Client::Soap.new(api, endpoint_uri, options)
end
def unmarshal_request(protocol_request)
@@ -380,7 +380,7 @@ def map_api(api, &block)
def select_class(klass)
return Integer if klass == Fixnum
if klass.ancestors.include?(ActiveRecord::Base)
- new_klass = Class.new(ActionService::Struct)
+ new_klass = Class.new(ActionWebService::Struct)
new_klass.class_eval <<-EOS
def self.name
"#{klass.name}"
View
8 ...ice/lib/action_service/protocol/xmlrpc.rb → ...lib/action_web_service/protocol/xmlrpc.rb
@@ -19,7 +19,7 @@ def create_method_response(successful, return_value)
end
end
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Protocol # :nodoc:
module XmlRpc # :nodoc:
def self.append_features(base) # :nodoc:
@@ -49,7 +49,7 @@ def self.create_protocol_request(container_class, action_pack_request)
def self.create_protocol_client(api, protocol_name, endpoint_uri, options)
return nil unless protocol_name.to_s.downcase.to_sym == :xmlrpc
- ActionService::Client::XmlRpc.new(api, endpoint_uri, options)
+ ActionWebService::Client::XmlRpc.new(api, endpoint_uri, options)
end
def initialize(container_class)
@@ -115,7 +115,7 @@ def ruby_to_xmlrpc(param, param_class)
param.map{|p| ruby_to_xmlrpc(p, param_class.klass)}
elsif param_class.ancestors.include?(ActiveRecord::Base)
param.instance_variable_get('@attributes')
- elsif param_class.ancestors.include?(ActionService::Struct)
+ elsif param_class.ancestors.include?(ActionWebService::Struct)
struct = {}
param_class.members.each do |name, klass|
value = param.send(name)
@@ -133,7 +133,7 @@ def xmlrpc_to_ruby(param, param_class)
param.map{|p| xmlrpc_to_ruby(p, param_class.klass)}
elsif param_class.ancestors.include?(ActiveRecord::Base)
raise(ProtocolError, "incoming ActiveRecord::Base types are not allowed")
- elsif param_class.ancestors.include?(ActionService::Struct)
+ elsif param_class.ancestors.include?(ActionWebService::Struct)
unless param.is_a?(Hash)
raise(ProtocolError, "expected parameter to be a Hash")
end
View
2  actionwebservice/lib/action_web_service/router.rb
@@ -0,0 +1,2 @@
+require 'action_web_service/router/action_controller'
+require 'action_web_service/router/wsdl'
View
8 ...ction_service/router/action_controller.rb → ...n_web_service/router/action_controller.rb
@@ -1,4 +1,4 @@
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Router # :nodoc:
module ActionController # :nodoc:
def self.append_features(base) # :nodoc:
@@ -20,7 +20,7 @@ def #{name}
EOS
end
end
- base.send(:include, ActionService::Router::ActionController::InstanceMethods)
+ base.send(:include, ActionWebService::Router::ActionController::InstanceMethods)
end
module InstanceMethods # :nodoc:
@@ -47,7 +47,7 @@ def process_action_service_request
}
send_data(protocol_response.raw_body, response_options)
else
- logger.fatal "Invalid Action Service service or method requested" unless logger.nil?
+ logger.fatal "Invalid Action Web Service service or method requested" unless logger.nil?
render_text 'Internal protocol error', "500 Invalid service/method"
end
rescue Exception => e
@@ -81,7 +81,7 @@ def log_request(protocol_request)
unless logger.nil?
web_service_name = protocol_request.web_service_name
method_name = protocol_request.public_method_name
- logger.info "\nProcessing Action Service Request: #{web_service_name}##{method_name}"
+ logger.info "\nProcessing Action Web Service Request: #{web_service_name}##{method_name}"
logger.info "Raw Request Body:"
logger.info protocol_request.raw_body
end
View
8 ...service/lib/action_service/router/wsdl.rb → ...ice/lib/action_web_service/router/wsdl.rb
@@ -1,4 +1,4 @@
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Router # :nodoc:
module Wsdl # :nodoc:
def self.append_features(base) # :nodoc:
@@ -13,7 +13,7 @@ class << self
module ClassMethods
def inherited(child)
inherited_without_wsdl(child)
- child.send(:include, ActionService::Router::Wsdl::InstanceMethods)
+ child.send(:include, ActionWebService::Router::Wsdl::InstanceMethods)
end
end
@@ -76,7 +76,7 @@ def to_wsdl(container, uri, soap_action_base)
xm.xsd(:schema, 'xmlns' => XsdNs, 'targetNamespace' => namespace) do
custom_types.each do |klass, mapping|
case
- when mapping.is_a?(ActionService::Protocol::Soap::SoapArrayMapping)
+ when mapping.is_a?(ActionWebService::Protocol::Soap::SoapArrayMapping)
xm.xsd(:complexType, 'name' => mapping.type_name) do
xm.xsd(:complexContent) do
xm.xsd(:restriction, 'base' => 'soapenc:Array') do
@@ -85,7 +85,7 @@ def to_wsdl(container, uri, soap_action_base)
end
end
end
- when mapping.is_a?(ActionService::Protocol::Soap::SoapMapping)
+ when mapping.is_a?(ActionWebService::Protocol::Soap::SoapMapping)
xm.xsd(:complexType, 'name' => mapping.type_name) do
xm.xsd(:all) do
mapping.each_attribute do |name, type_name|
View
12 ...onwebservice/lib/action_service/struct.rb → ...bservice/lib/action_web_service/struct.rb
@@ -1,14 +1,14 @@
-module ActionService
- # To send structured types across the wire, derive from ActionService::Struct,
+module ActionWebService
+ # To send structured types across the wire, derive from ActionWebService::Struct,
# and use +member+ to declare structure members.
#
- # ActionService::Struct should be used in method signatures when you want to accept or return
+ # ActionWebService::Struct should be used in method signatures when you want to accept or return
# structured types that have no Active Record model class representations, or you don't
# want to expose your entire Active Record model to remote callers.
#
# === Example
#
- # class Person < ActionService::Struct
+ # class Person < ActionWebService::Struct
# member :id, :int
# member :firstnames, [:string]
# member :lastname, :string
@@ -21,7 +21,7 @@ module ActionService
# automatically generated if its present in a signature.
class Struct
- # If a Hash is given as argument to an ActionService::Struct constructor,
+ # If a Hash is given as argument to an ActionWebService::Struct constructor,
# it can contain initial values for the structure member.
def initialize(values={})
if values.is_a?(Hash)
@@ -35,7 +35,7 @@ def [](name)
end
class << self
- include ActionService::Signature
+ include ActionWebService::Signature
# Creates a structure member with the specified +name+ and +type+. Generates
# accessor methods for reading and writing the member value.
View
0  ...vice/support/class_inheritable_options.rb → ...vice/support/class_inheritable_options.rb
File renamed without changes
View
8 ...e/lib/action_service/support/signature.rb → ...b/action_web_service/support/signature.rb
@@ -1,5 +1,5 @@
-module ActionService # :nodoc:
- # Action Service parameter specifiers may contain symbols or strings
+module ActionWebService # :nodoc:
+ # Action Web Service parameter specifiers may contain symbols or strings
# instead of Class objects, for a limited set of base types.
#
# This provides an unambiguous way to specify that a given parameter
@@ -57,7 +57,7 @@ def canonical_signature_base_type(base_type)
when :date
:date
else
- raise(SignatureError, ":#{base_type} is not an ActionService base type")
+ raise(SignatureError, ":#{base_type} is not an ActionWebService base type")
end
end
@@ -93,7 +93,7 @@ def signature_base_type(ruby_class)
when Date
:date
else
- raise(SignatureError, "#{ruby_class.name} is not an ActionService base type")
+ raise(SignatureError, "#{ruby_class.name} is not an ActionWebService base type")
end
end
end
View
4 actionwebservice/test/abstract_client.rb
@@ -4,7 +4,7 @@
require 'singleton'
module ClientTest
- class Person < ActionService::Struct
+ class Person < ActionWebService::Struct
member :firstnames, [:string]
member :lastname, :string
@@ -13,7 +13,7 @@ def ==(other)
end
end
- class API < ActionService::API::Base
+ class API < ActionWebService::API::Base
api_method :void
api_method :normal, :expects => [:int, :int], :returns => [:int]
api_method :array_return, :returns => [[Person]]
View
2  actionwebservice/test/abstract_soap.rb
@@ -22,7 +22,7 @@ def do_soap_call(public_method_name, *args)
param_def << ["in", "param#{i}", mapping.registry_mapping]
i += 1
end
- qname = XSD::QName.new('urn:ActionService', public_method_name)
+ qname = XSD::QName.new('urn:ActionWebService', public_method_name)
request = SOAP::RPC::SOAPMethodRequest.new(qname, param_def)
soap_args = []
i = 1
View
2  actionwebservice/test/abstract_unit.rb
@@ -1,7 +1,7 @@
$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'test/unit'
-require 'action_service'
+require 'action_web_service'
require 'action_controller'
require 'action_controller/test_process'
View
2  actionwebservice/test/api_test.rb
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/abstract_unit'
module APITest
- class API < ActionService::API::Base
+ class API < ActionWebService::API::Base
api_method :void
api_method :expects_and_returns, :expects_and_returns => [:string]
api_method :expects, :expects => [:int, :bool]
View
8 actionwebservice/test/base_test.rb
@@ -1,19 +1,19 @@
require File.dirname(__FILE__) + '/abstract_unit'
module BaseTest
- class API < ActionService::API::Base
+ class API < ActionWebService::API::Base
api_method :add, :expects => [:int, :int], :returns => [:int]
api_method :void
end
- class PristineAPI < ActionService::API::Base
+ class PristineAPI < ActionWebService::API::Base
inflect_names false
api_method :add
api_method :under_score
end
- class Service < ActionService::Base
+ class Service < ActionWebService::Base
web_service_api API
def add(a, b)
@@ -23,7 +23,7 @@ def void
end
end
- class PristineService < ActionService::Base
+ class PristineService < ActionWebService::Base
web_service_api PristineAPI
def add
View
2  actionwebservice/test/client_soap_test.rb
@@ -48,7 +48,7 @@ class TC_ClientSoap < Test::Unit::TestCase
def setup
@server = SoapServer.instance
@container = @server.container
- @client = ActionService::Client::Soap.new(API, "http://localhost:#{@server.server_port}/client/api")
+ @client = ActionWebService::Client::Soap.new(API, "http://localhost:#{@server.server_port}/client/api")
end
def test_void
View
2  actionwebservice/test/client_xmlrpc_test.rb
@@ -47,7 +47,7 @@ class TC_ClientXmlRpc < Test::Unit::TestCase
def setup
@server = XmlRpcServer.instance
@container = @server.container
- @client = ActionService::Client::XmlRpc.new(API, "http://localhost:#{@server.server_port}/client/api")
+ @client = ActionWebService::Client::XmlRpc.new(API, "http://localhost:#{@server.server_port}/client/api")
end
def test_void
View
6 actionwebservice/test/invocation_test.rb
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/abstract_unit'
module InvocationTest
- class API < ActionService::API::Base
+ class API < ActionWebService::API::Base
api_method :add, :expects => [:int, :int], :returns => [:int]
api_method :transmogrify, :expects_and_returns => [:string]
api_method :fail_with_reason
@@ -12,7 +12,7 @@ class API < ActionService::API::Base
api_method :only_two
end
- class Service < ActionService::Base
+ class Service < ActionWebService::Base
web_service_api API
before_invocation :intercept_before, :except => [:no_before]
@@ -81,7 +81,7 @@ def intercept_only(name, args)
end
class TC_Invocation < Test::Unit::TestCase
- include ActionService::Invocation
+ include ActionWebService::Invocation
def setup
@service = InvocationTest::Service.new
View
8 actionwebservice/test/protocol_registry_test.rb
@@ -2,7 +2,7 @@
module Foo
- include ActionService::Protocol
+ include ActionWebService::Protocol
def self.append_features(base)
super
@@ -15,14 +15,14 @@ def self.append_features(base)
class FooFullProtocol < AbstractProtocol
def self.create_protocol_request(klass, request)
protocol = FooFullProtocol.new klass
- ActionService::Protocol::ProtocolRequest.new(protocol, '', '', '', '')
+ ActionWebService::Protocol::ProtocolRequest.new(protocol, '', '', '', '')
end
end
class FooMinimalProtocol < AbstractProtocol
def self.create_protocol_request(klass, request)
protocol = FooMinimalProtocol.new klass
- ActionService::Protocol::ProtocolRequest.new(protocol, '', '', '', '')
+ ActionWebService::Protocol::ProtocolRequest.new(protocol, '', '', '', '')
end
end
@@ -31,7 +31,7 @@ class FooMinimalProtocolTwo < AbstractProtocol
end
class ProtocolRegistry
- include ActionService::Protocol::Registry
+ include ActionWebService::Protocol::Registry
include Foo
def all_protocols
View
14 actionwebservice/test/protocol_soap_test.rb
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/abstract_soap'
module ProtocolSoapTest
- class Person < ActionService::Struct
+ class Person < ActionWebService::Struct
member :id, Integer
member :names, [String]
member :lastname, String
@@ -12,7 +12,7 @@ def ==(other)
end
end
- class API < ActionService::API::Base
+ class API < ActionWebService::API::Base
api_method :argument_passing, :expects => [{:int=>:int}, {:string=>:string}, {:array=>[:int]}], :returns => [:bool]
api_method :array_returner, :returns => [[:int]]
api_method :nil_returner
@@ -22,7 +22,7 @@ class API < ActionService::API::Base
default_api_method :default
end
- class Service < ActionService::Base
+ class Service < ActionWebService::Base
web_service_api API
attr :int
@@ -73,10 +73,10 @@ def default(*args)
end
class AbstractContainer
- include ActionService::API
- include ActionService::Container
- include ActionService::Protocol::Registry
- include ActionService::Protocol::Soap
+ include ActionWebService::API
+ include ActionWebService::Container
+ include ActionWebService::Protocol::Registry
+ include ActionWebService::Protocol::Soap
wsdl_service_name 'Test'
View
14 actionwebservice/test/protocol_xmlrpc_test.rb
@@ -18,13 +18,13 @@ def parse_response(response)
end
module ProtocolXmlRpcTest
- class Person < ActionService::Struct
+ class Person < ActionWebService::Struct
member :firstname, String
member :lastname, String
member :active, TrueClass
end
- class API < ActionService::API::Base
+ class API < ActionWebService::API::Base
api_method :add, :expects => [Integer, Integer], :returns => [Integer]
api_method :hash_returner, :returns => [Hash]
api_method :array_returner, :returns => [[Integer]]
@@ -34,7 +34,7 @@ class API < ActionService::API::Base
default_api_method :default
end
- class Service < ActionService::Base
+ class Service < ActionWebService::Base
web_service_api API
attr :result
@@ -80,10 +80,10 @@ def default(*args)
$service = Service.new
class Container
- include ActionService::Container
- include ActionService::Protocol::Registry
- include ActionService::Protocol::Soap
- include ActionService::Protocol::XmlRpc
+ include ActionWebService::Container
+ include ActionWebService::Protocol::Registry
+ include ActionWebService::Protocol::Soap
+ include ActionWebService::Protocol::XmlRpc
def protocol_request(request)
probe_request_protocol(request)
View
6 actionwebservice/test/router_action_controller_test.rb
@@ -2,11 +2,11 @@
require 'wsdl/parser'
module RouterActionControllerTest
- class API < ActionService::API::Base
+ class API < ActionWebService::API::Base
api_method :add, :expects => [:int, :int], :returns => [:int]
end
- class Service < ActionService::Base
+ class Service < ActionWebService::Base
web_service_api API
attr :added
@@ -22,7 +22,7 @@ class DelegatedController < ActionController::Base
web_service(:test_service) { @service ||= Service.new; @service }
end
- class DirectAPI < ActionService::API::Base
+ class DirectAPI < ActionWebService::API::Base
api_method :add, :expects => [{:a=>:int}, {:b=>:int}], :returns => [:int]
api_method :before_filtered
api_method :after_filtered, :returns => [:int]
View
6 actionwebservice/test/router_wsdl_test.rb
@@ -2,20 +2,20 @@
require 'wsdl/parser'
module RouterWsdlTest
- class Person < ActionService::Struct
+ class Person < ActionWebService::Struct
member :id, Integer
member :names, [String]
member :lastname, String
member :deleted, TrueClass
end
- class API < ActionService::API::Base
+ class API < ActionWebService::API::Base
api_method :add, :expects => [{:a=>:int}, {:b=>:int}], :returns => [:int]
api_method :find_people, :returns => [[Person]]
api_method :nil_returner
end
- class Service < ActionService::Base
+ class Service < ActionWebService::Base
web_service_api API
def add(a, b)
View
2  actionwebservice/test/struct_test.rb
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/abstract_unit'
module StructTest
- class Struct < ActionService::Struct
+ class Struct < ActionWebService::Struct
member :id, Integer
member :name, String
member :items, [String]

0 comments on commit ec03a60

Please sign in to comment.
Something went wrong with that request. Please try again.