aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice
diff options
context:
space:
mode:
Diffstat (limited to 'actionwebservice')
-rw-r--r--actionwebservice/ChangeLog2
-rw-r--r--actionwebservice/HACKING4
-rw-r--r--actionwebservice/README54
-rw-r--r--actionwebservice/Rakefile22
-rw-r--r--actionwebservice/TODO11
-rw-r--r--actionwebservice/examples/googlesearch/autoloading/google_search_api.rb8
-rw-r--r--actionwebservice/examples/googlesearch/delegated/google_search_service.rb10
-rw-r--r--actionwebservice/examples/googlesearch/direct/google_search_api.rb8
-rw-r--r--actionwebservice/examples/metaWeblog/README16
-rw-r--r--actionwebservice/examples/metaWeblog/blog_controller.rb10
-rw-r--r--actionwebservice/lib/action_service/api.rb2
-rw-r--r--actionwebservice/lib/action_service/client.rb3
-rw-r--r--actionwebservice/lib/action_service/protocol.rb4
-rw-r--r--actionwebservice/lib/action_service/router.rb2
-rw-r--r--actionwebservice/lib/action_web_service.rb (renamed from actionwebservice/lib/action_service.rb)38
-rw-r--r--actionwebservice/lib/action_web_service/api.rb2
-rw-r--r--actionwebservice/lib/action_web_service/api/abstract.rb (renamed from actionwebservice/lib/action_service/api/abstract.rb)28
-rw-r--r--actionwebservice/lib/action_web_service/api/action_controller.rb (renamed from actionwebservice/lib/action_service/api/action_controller.rb)2
-rw-r--r--actionwebservice/lib/action_web_service/base.rb (renamed from actionwebservice/lib/action_service/base.rb)14
-rw-r--r--actionwebservice/lib/action_web_service/client.rb3
-rw-r--r--actionwebservice/lib/action_web_service/client/base.rb (renamed from actionwebservice/lib/action_service/client/base.rb)2
-rw-r--r--actionwebservice/lib/action_web_service/client/soap.rb (renamed from actionwebservice/lib/action_service/client/soap.rb)14
-rw-r--r--actionwebservice/lib/action_web_service/client/xmlrpc.rb (renamed from actionwebservice/lib/action_service/client/xmlrpc.rb)8
-rw-r--r--actionwebservice/lib/action_web_service/container.rb (renamed from actionwebservice/lib/action_service/container.rb)16
-rw-r--r--actionwebservice/lib/action_web_service/invocation.rb (renamed from actionwebservice/lib/action_service/invocation.rb)10
-rw-r--r--actionwebservice/lib/action_web_service/protocol.rb4
-rw-r--r--actionwebservice/lib/action_web_service/protocol/abstract.rb (renamed from actionwebservice/lib/action_service/protocol/abstract.rb)4
-rw-r--r--actionwebservice/lib/action_web_service/protocol/registry.rb (renamed from actionwebservice/lib/action_service/protocol/registry.rb)4
-rw-r--r--actionwebservice/lib/action_web_service/protocol/soap.rb (renamed from actionwebservice/lib/action_service/protocol/soap.rb)10
-rw-r--r--actionwebservice/lib/action_web_service/protocol/xmlrpc.rb (renamed from actionwebservice/lib/action_service/protocol/xmlrpc.rb)8
-rw-r--r--actionwebservice/lib/action_web_service/router.rb2
-rw-r--r--actionwebservice/lib/action_web_service/router/action_controller.rb (renamed from actionwebservice/lib/action_service/router/action_controller.rb)8
-rw-r--r--actionwebservice/lib/action_web_service/router/wsdl.rb (renamed from actionwebservice/lib/action_service/router/wsdl.rb)8
-rw-r--r--actionwebservice/lib/action_web_service/struct.rb (renamed from actionwebservice/lib/action_service/struct.rb)12
-rw-r--r--actionwebservice/lib/action_web_service/support/class_inheritable_options.rb (renamed from actionwebservice/lib/action_service/support/class_inheritable_options.rb)0
-rw-r--r--actionwebservice/lib/action_web_service/support/signature.rb (renamed from actionwebservice/lib/action_service/support/signature.rb)8
-rw-r--r--actionwebservice/test/abstract_client.rb4
-rw-r--r--actionwebservice/test/abstract_soap.rb2
-rw-r--r--actionwebservice/test/abstract_unit.rb2
-rw-r--r--actionwebservice/test/api_test.rb2
-rw-r--r--actionwebservice/test/base_test.rb8
-rw-r--r--actionwebservice/test/client_soap_test.rb2
-rw-r--r--actionwebservice/test/client_xmlrpc_test.rb2
-rw-r--r--actionwebservice/test/invocation_test.rb6
-rw-r--r--actionwebservice/test/protocol_registry_test.rb8
-rw-r--r--actionwebservice/test/protocol_soap_test.rb14
-rw-r--r--actionwebservice/test/protocol_xmlrpc_test.rb14
-rw-r--r--actionwebservice/test/router_action_controller_test.rb6
-rw-r--r--actionwebservice/test/router_wsdl_test.rb6
-rw-r--r--actionwebservice/test/struct_test.rb2
50 files changed, 217 insertions, 222 deletions
diff --git a/actionwebservice/ChangeLog b/actionwebservice/ChangeLog
index 010c4f638a..c9803bd2b7 100644
--- a/actionwebservice/ChangeLog
+++ b/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.
diff --git a/actionwebservice/HACKING b/actionwebservice/HACKING
index 9c0cde6313..536aac7a24 100644
--- a/actionwebservice/HACKING
+++ b/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
diff --git a/actionwebservice/README b/actionwebservice/README
index c011b9c537..c8a7da1c57 100644
--- a/actionwebservice/README
+++ b/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
diff --git a/actionwebservice/Rakefile b/actionwebservice/Rakefile
index f4ed2bdb31..49c3409e60 100644
--- a/actionwebservice/Rakefile
+++ b/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/
diff --git a/actionwebservice/TODO b/actionwebservice/TODO
index 4ee7545de5..e753fbb1d7 100644
--- a/actionwebservice/TODO
+++ b/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
diff --git a/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb b/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb
index e7e33a1105..ed69fed7bc 100644
--- a/actionwebservice/examples/googlesearch/autoloading/google_search_api.rb
+++ b/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}]
diff --git a/actionwebservice/examples/googlesearch/delegated/google_search_service.rb b/actionwebservice/examples/googlesearch/delegated/google_search_service.rb
index da7f8f4529..ade354d89d 100644
--- a/actionwebservice/examples/googlesearch/delegated/google_search_service.rb
+++ b/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)
diff --git a/actionwebservice/examples/googlesearch/direct/google_search_api.rb b/actionwebservice/examples/googlesearch/direct/google_search_api.rb
index e7e33a1105..ed69fed7bc 100644
--- a/actionwebservice/examples/googlesearch/direct/google_search_api.rb
+++ b/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}]
diff --git a/actionwebservice/examples/metaWeblog/README b/actionwebservice/examples/metaWeblog/README
index f8a56d7018..0550b06623 100644
--- a/actionwebservice/examples/metaWeblog/README
+++ b/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.
diff --git a/actionwebservice/examples/metaWeblog/blog_controller.rb b/actionwebservice/examples/metaWeblog/blog_controller.rb
index aff2e909ea..e575203311 100644
--- a/actionwebservice/examples/metaWeblog/blog_controller.rb
+++ b/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 @@ module Blog
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 @@ module Blog
end
# skeleton metaWeblog API
-class MetaWeblogAPI < ActionService::API::Base
+class MetaWeblogAPI < ActionWebService::API::Base
inflect_names false
api_method :newPost, :returns => [:string], :expects => [
diff --git a/actionwebservice/lib/action_service/api.rb b/actionwebservice/lib/action_service/api.rb
deleted file mode 100644
index 61f36fff56..0000000000
--- a/actionwebservice/lib/action_service/api.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-require 'action_service/api/abstract'
-require 'action_service/api/action_controller'
diff --git a/actionwebservice/lib/action_service/client.rb b/actionwebservice/lib/action_service/client.rb
deleted file mode 100644
index ce91529f20..0000000000
--- a/actionwebservice/lib/action_service/client.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-require 'action_service/client/base'
-require 'action_service/client/soap'
-require 'action_service/client/xmlrpc'
diff --git a/actionwebservice/lib/action_service/protocol.rb b/actionwebservice/lib/action_service/protocol.rb
deleted file mode 100644
index 5e71b2bcfd..0000000000
--- a/actionwebservice/lib/action_service/protocol.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-require 'action_service/protocol/abstract'
-require 'action_service/protocol/registry'
-require 'action_service/protocol/soap'
-require 'action_service/protocol/xmlrpc'
diff --git a/actionwebservice/lib/action_service/router.rb b/actionwebservice/lib/action_service/router.rb
deleted file mode 100644
index 16f0ae4463..0000000000
--- a/actionwebservice/lib/action_service/router.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-require 'action_service/router/action_controller'
-require 'action_service/router/wsdl'
diff --git a/actionwebservice/lib/action_service.rb b/actionwebservice/lib/action_web_service.rb
index 005e829e7b..a55afc2244 100644
--- a/actionwebservice/lib/action_service.rb
+++ b/actionwebservice/lib/action_web_service.rb
@@ -34,27 +34,27 @@ end
$:.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
diff --git a/actionwebservice/lib/action_web_service/api.rb b/actionwebservice/lib/action_web_service/api.rb
new file mode 100644
index 0000000000..0c71de5654
--- /dev/null
+++ b/actionwebservice/lib/action_web_service/api.rb
@@ -0,0 +1,2 @@
+require 'action_web_service/api/abstract'
+require 'action_web_service/api/action_controller'
diff --git a/actionwebservice/lib/action_service/api/abstract.rb b/actionwebservice/lib/action_web_service/api/abstract.rb
index aab37a285d..0ce68d10f7 100644
--- a/actionwebservice/lib/action_service/api/abstract.rb
+++ b/actionwebservice/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 @@ module ActionService # :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 ActionService # :nodoc:
#
# ==== 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 ActionService # :nodoc:
# 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 @@ module ActionService # :nodoc:
# 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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
# 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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
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
diff --git a/actionwebservice/lib/action_service/api/action_controller.rb b/actionwebservice/lib/action_web_service/api/action_controller.rb
index d603f3a570..604cbfe704 100644
--- a/actionwebservice/lib/action_service/api/action_controller.rb
+++ b/actionwebservice/lib/action_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:
diff --git a/actionwebservice/lib/action_service/base.rb b/actionwebservice/lib/action_web_service/base.rb
index 05fd2afd34..42a514716a 100644
--- a/actionwebservice/lib/action_service/base.rb
+++ b/actionwebservice/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 @@ module ActionService # :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
diff --git a/actionwebservice/lib/action_web_service/client.rb b/actionwebservice/lib/action_web_service/client.rb
new file mode 100644
index 0000000000..77f934882c
--- /dev/null
+++ b/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'
diff --git a/actionwebservice/lib/action_service/client/base.rb b/actionwebservice/lib/action_web_service/client/base.rb
index 955887a4d8..d01cffcd56 100644
--- a/actionwebservice/lib/action_service/client/base.rb
+++ b/actionwebservice/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
diff --git a/actionwebservice/lib/action_service/client/soap.rb b/actionwebservice/lib/action_web_service/client/soap.rb
index c617f36589..3557f88594 100644
--- a/actionwebservice/lib/action_service/client/soap.rb
+++ b/actionwebservice/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 @@ module ActionService # :nodoc:
# 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)
diff --git a/actionwebservice/lib/action_service/client/xmlrpc.rb b/actionwebservice/lib/action_web_service/client/xmlrpc.rb
index d0d007f871..df51230b81 100644
--- a/actionwebservice/lib/action_service/client/xmlrpc.rb
+++ b/actionwebservice/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.
#
diff --git a/actionwebservice/lib/action_service/container.rb b/actionwebservice/lib/action_web_service/container.rb
index 282e6ad928..6fa14def56 100644
--- a/actionwebservice/lib/action_service/container.rb
+++ b/actionwebservice/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 @@ module ActionService # :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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
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
diff --git a/actionwebservice/lib/action_service/invocation.rb b/actionwebservice/lib/action_web_service/invocation.rb
index f35ab76386..64d3e8d524 100644
--- a/actionwebservice/lib/action_service/invocation.rb
+++ b/actionwebservice/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 @@ module ActionService # :nodoc:
#
# === Example
#
- # class CustomService < ActionService::Base
+ # class CustomService < ActionWebService::Base
# before_invocation :intercept_add, :only => [:add]
#
# def add(a, b)
diff --git a/actionwebservice/lib/action_web_service/protocol.rb b/actionwebservice/lib/action_web_service/protocol.rb
new file mode 100644
index 0000000000..733787136a
--- /dev/null
+++ b/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'
diff --git a/actionwebservice/lib/action_service/protocol/abstract.rb b/actionwebservice/lib/action_web_service/protocol/abstract.rb
index bd02b6e829..9199dfe33f 100644
--- a/actionwebservice/lib/action_service/protocol/abstract.rb
+++ b/actionwebservice/lib/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:
diff --git a/actionwebservice/lib/action_service/protocol/registry.rb b/actionwebservice/lib/action_web_service/protocol/registry.rb
index e06361f916..0173673556 100644
--- a/actionwebservice/lib/action_service/protocol/registry.rb
+++ b/actionwebservice/lib/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 ActionService # :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:
diff --git a/actionwebservice/lib/action_service/protocol/soap.rb b/actionwebservice/lib/action_web_service/protocol/soap.rb
index 993e174e52..3c527fea93 100644
--- a/actionwebservice/lib/action_service/protocol/soap.rb
+++ b/actionwebservice/lib/action_web_service/protocol/soap.rb
@@ -5,17 +5,17 @@ require 'xsd/datatypes'
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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
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}"
diff --git a/actionwebservice/lib/action_service/protocol/xmlrpc.rb b/actionwebservice/lib/action_web_service/protocol/xmlrpc.rb
index 32b8e00327..414bcfdbf7 100644
--- a/actionwebservice/lib/action_service/protocol/xmlrpc.rb
+++ b/actionwebservice/lib/action_web_service/protocol/xmlrpc.rb
@@ -19,7 +19,7 @@ module XMLRPC # :nodoc:
end
end
-module ActionService # :nodoc:
+module ActionWebService # :nodoc:
module Protocol # :nodoc:
module XmlRpc # :nodoc:
def self.append_features(base) # :nodoc:
@@ -49,7 +49,7 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
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
diff --git a/actionwebservice/lib/action_web_service/router.rb b/actionwebservice/lib/action_web_service/router.rb
new file mode 100644
index 0000000000..4bfb0bc8b7
--- /dev/null
+++ b/actionwebservice/lib/action_web_service/router.rb
@@ -0,0 +1,2 @@
+require 'action_web_service/router/action_controller'
+require 'action_web_service/router/wsdl'
diff --git a/actionwebservice/lib/action_service/router/action_controller.rb b/actionwebservice/lib/action_web_service/router/action_controller.rb
index ca9c94e35c..591fe4e232 100644
--- a/actionwebservice/lib/action_service/router/action_controller.rb
+++ b/actionwebservice/lib/action_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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
}
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 @@ module ActionService # :nodoc:
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
diff --git a/actionwebservice/lib/action_service/router/wsdl.rb b/actionwebservice/lib/action_web_service/router/wsdl.rb
index c2f29da0b0..6963334818 100644
--- a/actionwebservice/lib/action_service/router/wsdl.rb
+++ b/actionwebservice/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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
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|
diff --git a/actionwebservice/lib/action_service/struct.rb b/actionwebservice/lib/action_web_service/struct.rb
index 142127b052..5420f4cf49 100644
--- a/actionwebservice/lib/action_service/struct.rb
+++ b/actionwebservice/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 @@ module ActionService
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.
diff --git a/actionwebservice/lib/action_service/support/class_inheritable_options.rb b/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb
index 4d1c2ed471..4d1c2ed471 100644
--- a/actionwebservice/lib/action_service/support/class_inheritable_options.rb
+++ b/actionwebservice/lib/action_web_service/support/class_inheritable_options.rb
diff --git a/actionwebservice/lib/action_service/support/signature.rb b/actionwebservice/lib/action_web_service/support/signature.rb
index 946118c523..00c62a2232 100644
--- a/actionwebservice/lib/action_service/support/signature.rb
+++ b/actionwebservice/lib/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 @@ module ActionService # :nodoc:
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 @@ module ActionService # :nodoc:
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
diff --git a/actionwebservice/test/abstract_client.rb b/actionwebservice/test/abstract_client.rb
index 70d2d21124..0197b87d63 100644
--- a/actionwebservice/test/abstract_client.rb
+++ b/actionwebservice/test/abstract_client.rb
@@ -4,7 +4,7 @@ require 'webrick/log'
require 'singleton'
module ClientTest
- class Person < ActionService::Struct
+ class Person < ActionWebService::Struct
member :firstnames, [:string]
member :lastname, :string
@@ -13,7 +13,7 @@ module ClientTest
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]]
diff --git a/actionwebservice/test/abstract_soap.rb b/actionwebservice/test/abstract_soap.rb
index 7454be9bdf..351a4f8479 100644
--- a/actionwebservice/test/abstract_soap.rb
+++ b/actionwebservice/test/abstract_soap.rb
@@ -22,7 +22,7 @@ class AbstractSoapTest < Test::Unit::TestCase
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
diff --git a/actionwebservice/test/abstract_unit.rb b/actionwebservice/test/abstract_unit.rb
index 54ca73b35c..e33c5c9bbe 100644
--- a/actionwebservice/test/abstract_unit.rb
+++ b/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'
diff --git a/actionwebservice/test/api_test.rb b/actionwebservice/test/api_test.rb
index 2ef5cc7bda..b61a4b57c5 100644
--- a/actionwebservice/test/api_test.rb
+++ b/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]
diff --git a/actionwebservice/test/base_test.rb b/actionwebservice/test/base_test.rb
index a9fbdd1a8b..55a112a089 100644
--- a/actionwebservice/test/base_test.rb
+++ b/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 @@ module BaseTest
end
end
- class PristineService < ActionService::Base
+ class PristineService < ActionWebService::Base
web_service_api PristineAPI
def add
diff --git a/actionwebservice/test/client_soap_test.rb b/actionwebservice/test/client_soap_test.rb
index 80fae90543..82ccef6f1b 100644
--- a/actionwebservice/test/client_soap_test.rb
+++ b/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
diff --git a/actionwebservice/test/client_xmlrpc_test.rb b/actionwebservice/test/client_xmlrpc_test.rb
index 35768adf32..f9be9bfe16 100644
--- a/actionwebservice/test/client_xmlrpc_test.rb
+++ b/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
diff --git a/actionwebservice/test/invocation_test.rb b/actionwebservice/test/invocation_test.rb
index e4c82a35f8..8ca80ec8f2 100644
--- a/actionwebservice/test/invocation_test.rb
+++ b/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 @@ module InvocationTest
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 @@ module InvocationTest
end
class TC_Invocation < Test::Unit::TestCase
- include ActionService::Invocation
+ include ActionWebService::Invocation
def setup
@service = InvocationTest::Service.new
diff --git a/actionwebservice/test/protocol_registry_test.rb b/actionwebservice/test/protocol_registry_test.rb
index 8e2b9659a6..261f6f400e 100644
--- a/actionwebservice/test/protocol_registry_test.rb
+++ b/actionwebservice/test/protocol_registry_test.rb
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/abstract_unit'
module Foo
- include ActionService::Protocol
+ include ActionWebService::Protocol
def self.append_features(base)
super
@@ -15,14 +15,14 @@ module Foo
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 @@ module Foo
end
class ProtocolRegistry
- include ActionService::Protocol::Registry
+ include ActionWebService::Protocol::Registry
include Foo
def all_protocols
diff --git a/actionwebservice/test/protocol_soap_test.rb b/actionwebservice/test/protocol_soap_test.rb
index 164d06bbd6..1130dff3a7 100644
--- a/actionwebservice/test/protocol_soap_test.rb
+++ b/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 @@ module ProtocolSoapTest
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 @@ module ProtocolSoapTest
default_api_method :default
end
- class Service < ActionService::Base
+ class Service < ActionWebService::Base
web_service_api API
attr :int
@@ -73,10 +73,10 @@ module ProtocolSoapTest
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'
diff --git a/actionwebservice/test/protocol_xmlrpc_test.rb b/actionwebservice/test/protocol_xmlrpc_test.rb
index a8a6efc07e..7dc5cf0252 100644
--- a/actionwebservice/test/protocol_xmlrpc_test.rb
+++ b/actionwebservice/test/protocol_xmlrpc_test.rb
@@ -18,13 +18,13 @@ module XMLRPC
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 @@ module ProtocolXmlRpcTest
default_api_method :default
end
- class Service < ActionService::Base
+ class Service < ActionWebService::Base
web_service_api API
attr :result
@@ -80,10 +80,10 @@ module ProtocolXmlRpcTest
$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)
diff --git a/actionwebservice/test/router_action_controller_test.rb b/actionwebservice/test/router_action_controller_test.rb
index e26d67c194..4f6d40e738 100644
--- a/actionwebservice/test/router_action_controller_test.rb
+++ b/actionwebservice/test/router_action_controller_test.rb
@@ -2,11 +2,11 @@ require File.dirname(__FILE__) + '/abstract_soap'
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 @@ module RouterActionControllerTest
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]
diff --git a/actionwebservice/test/router_wsdl_test.rb b/actionwebservice/test/router_wsdl_test.rb
index 6812d25579..a441e73f37 100644
--- a/actionwebservice/test/router_wsdl_test.rb
+++ b/actionwebservice/test/router_wsdl_test.rb
@@ -2,20 +2,20 @@ require File.dirname(__FILE__) + '/abstract_unit'
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)
diff --git a/actionwebservice/test/struct_test.rb b/actionwebservice/test/struct_test.rb
index b883c6d991..e6f1603c73 100644
--- a/actionwebservice/test/struct_test.rb
+++ b/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]