aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-02-18 23:55:29 +0000
committerLeon Breedt <bitserf@gmail.com>2005-02-18 23:55:29 +0000
commitec03a601811587dd4265667aadd50c101c23b116 (patch)
treeb040f5f1488267b35bc0110efe029a789c3a350b /actionwebservice/lib
parent5760a6cb3e3f3ce3b41c25023f3fbb875590c5bc (diff)
downloadrails-ec03a601811587dd4265667aadd50c101c23b116.tar.gz
rails-ec03a601811587dd4265667aadd50c101c23b116.tar.bz2
rails-ec03a601811587dd4265667aadd50c101c23b116.zip
rename entire package to Action Web Service
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib')
-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
26 files changed, 108 insertions, 108 deletions
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