aboutsummaryrefslogtreecommitdiffstats
path: root/actionwebservice/lib/action_web_service/protocol
diff options
context:
space:
mode:
authorLeon Breedt <bitserf@gmail.com>2005-02-27 21:21:40 +0000
committerLeon Breedt <bitserf@gmail.com>2005-02-27 21:21:40 +0000
commit100015cd806e31578a03ba23ffbc12c093118a26 (patch)
tree20cd8b5f8fd8cbfb60f2b8d2f309c0c259889d50 /actionwebservice/lib/action_web_service/protocol
parent19dddf24a63bd8a715ca47955963ba77d174d830 (diff)
downloadrails-100015cd806e31578a03ba23ffbc12c093118a26.tar.gz
rails-100015cd806e31578a03ba23ffbc12c093118a26.tar.bz2
rails-100015cd806e31578a03ba23ffbc12c093118a26.zip
Make all custom types and method calls are declared in the 'urn:ActionWebService'
namespace as a default, fixes SOAP marshaling for .NET, a regression since the merge. Make array annotation be recursive in WS::Marshaling::SoapMarshaling, this makes typed arrays buried in nested structures still be annotated correctly. Support :layered dispatching mode for XML-RPC namespaced method names. Change WS::ParamInfo.create signature to require type_binding, and update all uses of this. Restore #default_api_method functionality, fixes a regression since the merge. Fix marshalling of ActiveRecord::Base derivatives, fixes a regression since the merge. This changeset closes #676, #677, and #678. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib/action_web_service/protocol')
-rw-r--r--actionwebservice/lib/action_web_service/protocol/abstract.rb6
-rw-r--r--actionwebservice/lib/action_web_service/protocol/discovery.rb10
-rw-r--r--actionwebservice/lib/action_web_service/protocol/soap_protocol.rb14
-rw-r--r--actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb10
4 files changed, 20 insertions, 20 deletions
diff --git a/actionwebservice/lib/action_web_service/protocol/abstract.rb b/actionwebservice/lib/action_web_service/protocol/abstract.rb
index f628fc4aee..7526539d53 100644
--- a/actionwebservice/lib/action_web_service/protocol/abstract.rb
+++ b/actionwebservice/lib/action_web_service/protocol/abstract.rb
@@ -1,9 +1,9 @@
module ActionWebService # :nodoc:
module Protocol # :nodoc:
- class ProtocolError < ActionWebService::ActionWebServiceError
+ class ProtocolError < ActionWebServiceError # :nodoc:
end
- class Request
+ class Request # :nodoc:
attr :protocol
attr :method_name
attr :method_params
@@ -17,7 +17,7 @@ module ActionWebService # :nodoc:
end
end
- class Response
+ class Response # :nodoc:
attr :body
attr :content_type
diff --git a/actionwebservice/lib/action_web_service/protocol/discovery.rb b/actionwebservice/lib/action_web_service/protocol/discovery.rb
index ab51958ed9..40875975bf 100644
--- a/actionwebservice/lib/action_web_service/protocol/discovery.rb
+++ b/actionwebservice/lib/action_web_service/protocol/discovery.rb
@@ -1,18 +1,18 @@
-module ActionWebService
- module Protocol
- module Discovery
+module ActionWebService # :nodoc:
+ module Protocol # :nodoc:
+ module Discovery # :nodoc:
def self.included(base)
base.extend(ClassMethods)
base.send(:include, ActionWebService::Protocol::Discovery::InstanceMethods)
end
- module ClassMethods
+ module ClassMethods # :nodoc:
def register_protocol(klass)
write_inheritable_array("web_service_protocols", [klass])
end
end
- module InstanceMethods
+ module InstanceMethods # :nodoc:
private
def discover_web_service_request(ap_request)
(self.class.read_inheritable_attribute("web_service_protocols") || []).each do |protocol|
diff --git a/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb b/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb
index f2e761f431..6e3df54b00 100644
--- a/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb
+++ b/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb
@@ -1,15 +1,15 @@
-module ActionWebService
- module Protocol
- module Soap
+module ActionWebService # :nodoc:
+ module Protocol # :nodoc:
+ module Soap # :nodoc:
def self.included(base)
base.register_protocol(SoapProtocol)
base.class_inheritable_option(:wsdl_service_name)
end
- class SoapProtocol
+ class SoapProtocol # :nodoc:
def initialize
- @encoder = WS::Encoding::SoapRpcEncoding.new
- @marshaler = WS::Marshaling::SoapMarshaler.new
+ @encoder = WS::Encoding::SoapRpcEncoding.new 'urn:ActionWebService'
+ @marshaler = WS::Marshaling::SoapMarshaler.new 'urn:ActionWebService'
end
def unmarshal_request(ap_request)
@@ -23,7 +23,7 @@ module ActionWebService
def marshal_response(method_name, return_value, signature_type)
if !return_value.nil? && signature_type
type_binding = @marshaler.register_type(signature_type)
- info = WS::ParamInfo.create(signature_type, 0, type_binding)
+ info = WS::ParamInfo.create(signature_type, type_binding, 0)
return_value = @marshaler.marshal(WS::Param.new(return_value, info))
else
return_value = nil
diff --git a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb
index 1533a2bdb9..8d6af246ec 100644
--- a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb
+++ b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb
@@ -1,11 +1,11 @@
-module ActionWebService
- module Protocol
- module XmlRpc
+module ActionWebService # :nodoc:
+ module Protocol # :nodoc:
+ module XmlRpc # :nodoc:
def self.included(base)
base.register_protocol(XmlRpcProtocol)
end
- class XmlRpcProtocol
+ class XmlRpcProtocol # :nodoc:
attr :marshaler
def initialize
@@ -25,7 +25,7 @@ module ActionWebService
def marshal_response(method_name, return_value, signature_type)
if !return_value.nil? && signature_type
type_binding = @marshaler.register_type(signature_type)
- info = WS::ParamInfo.create(signature_type, 0, type_binding)
+ info = WS::ParamInfo.create(signature_type, type_binding, 0)
return_value = @marshaler.marshal(WS::Param.new(return_value, info))
else
return_value = nil