From 100015cd806e31578a03ba23ffbc12c093118a26 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Sun, 27 Feb 2005 21:21:40 +0000 Subject: 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 --- actionwebservice/README | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) (limited to 'actionwebservice/README') diff --git a/actionwebservice/README b/actionwebservice/README index c8a7da1c57..1d93bde02f 100644 --- a/actionwebservice/README +++ b/actionwebservice/README @@ -114,7 +114,7 @@ For this example, protocol requests for +Add+ and +Remove+ methods sent to === Delegated dispatching This mode can be turned on by setting the +web_service_dispatching_mode+ option -in a controller. +in a controller to :delegated. In this mode, the controller contains one or more web service objects (objects that implement an ActionWebService::API::Base definition). These web service @@ -153,6 +153,50 @@ Other controller actions (actions that aren't the target of a +web_service+ call are ignored for ActionWebService purposes, and can do normal action tasks. +=== Layered dispatching + +This mode can be turned on by setting the +web_service_dispatching_mode+ option +in a controller to :layered. + +This mode is similar to _delegated_ mode, in that multiple web service objects +can be attached to one controller, however, all protocol requests are sent to a +single endpoint. + +This mode is only usable by XML-RPC. In this mode, method names can contain +_prefixes_, which will indicate which web service object implements the API +identified by that prefix. + +The _prefix_ can be any word, followed by a period. + +==== Layered dispatching example + + + class ApiController < ApplicationController + web_service_dispatching_mode :layered + + web_service :mt, MovableTypeService.new + web_service :blogger, BloggerService.new + web_service :metaWeblog, MetaWeblogService.new + end + + class MovableTypeService < ActionWebService::Base + ... + end + + class BloggerService < ActionWebService::Base + ... + end + + class MetaWeblogService < ActionWebService::API::Base + ... + end + + +For this example, a remote call for a method with a name like +mt.getCategories will be dispatched as the getCategories +method on the :mt service. + + == Using the client support Action Web Service includes client classes that can use the same API -- cgit v1.2.3