From ebb6fb09280f828258432223fd543de9dfda6370 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Sat, 25 Jun 2005 06:27:39 +0000 Subject: fix WSDL generation, change the way protocols are instantiated, and add the ability to override the namespace used in WSDL instead of always forcing 'urn:ActionWebService' git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1501 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionwebservice/README | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'actionwebservice/README') diff --git a/actionwebservice/README b/actionwebservice/README index 8f4588cdf9..a725f9db71 100644 --- a/actionwebservice/README +++ b/actionwebservice/README @@ -78,15 +78,15 @@ modes of dispatching protocol requests, _Direct_, and _Delegated_. === Direct dispatching -This is the default mode. In this mode, controller actions implement the API -methods, and parameters for incoming method calls will be placed in -@params (keyed by name), and @method_params (ordered list). +This is the default mode. In this mode, public controller instance methods +implement the API methods, and parameters are passed through to the methods in +accordance with the API specification. -The return value of the action is sent back as the return value to the +The return value of the method is sent back as the return value to the caller. In this mode, a special api action is generated in the target -controller to unwrap the protocol request, forward it on to the relevant action +controller to unwrap the protocol request, forward it on to the relevant method and send back the wrapped return value. This action must not be overridden. @@ -108,7 +108,7 @@ overridden. For this example, protocol requests for +Add+ and +Remove+ methods sent to -/person/api will be routed to the actions +add+ and +remove+. +/person/api will be routed to the controller methods +add+ and +remove+. === Delegated dispatching @@ -196,6 +196,25 @@ For this example, an XML-RPC call for a method with a name like method on the :mt service. +== Customizing WSDL generation + +You can customize the names used for the SOAP bindings in the generated +WSDL by using the wsdl_service_name option in a controller: + + class WsController < ApplicationController + wsdl_service_name 'MyApp' + end + +You can also customize the namespace used in the generated WSDL for +custom types and message definition types: + + class WsController < ApplicationController + wsdl_namespace 'http://my.company.com/app/wsapi' + end + +The default namespace used is 'urn:ActionWebService', if you don't supply +one. + == Testing your APIs -- cgit v1.2.3