aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionwebservice/CHANGELOG2
-rw-r--r--actionwebservice/lib/action_web_service/protocol/soap_protocol.rb9
-rw-r--r--actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb9
3 files changed, 20 insertions, 0 deletions
diff --git a/actionwebservice/CHANGELOG b/actionwebservice/CHANGELOG
index 8b2d63e804..e21a9e73ba 100644
--- a/actionwebservice/CHANGELOG
+++ b/actionwebservice/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Added ActionWebService::API::Base.soap_client and ActionWebService::API::Base.xmlrpc_client helper methods to create the internal clients for an API, useful for testing from ./script/console
+
* ActionWebService now always returns UTF-8 responses.
*0.8.1* (11 July, 2005)
diff --git a/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb b/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb
index b28d57d00e..1bce496a7b 100644
--- a/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb
+++ b/actionwebservice/lib/action_web_service/protocol/soap_protocol.rb
@@ -1,7 +1,16 @@
require 'action_web_service/protocol/soap_protocol/marshaler'
require 'soap/streamHandler'
+require 'action_web_service/client/soap_client'
module ActionWebService # :nodoc:
+ module API # :nodoc:
+ class Base # :nodoc:
+ def self.soap_client(endpoint_uri, options={})
+ ActionWebService::Client::Soap.new self, endpoint_uri, options
+ end
+ end
+ end
+
module Protocol # :nodoc:
module Soap # :nodoc:
def self.included(base)
diff --git a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb
index 2ee5af7c3f..53b67ced4c 100644
--- a/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb
+++ b/actionwebservice/lib/action_web_service/protocol/xmlrpc_protocol.rb
@@ -1,4 +1,5 @@
require 'xmlrpc/marshal'
+require 'action_web_service/client/xmlrpc_client'
module XMLRPC # :nodoc:
class FaultException # :nodoc:
@@ -7,6 +8,14 @@ module XMLRPC # :nodoc:
end
module ActionWebService # :nodoc:
+ module API # :nodoc:
+ class Base # :nodoc:
+ def self.xmlrpc_client(endpoint_uri, options={})
+ ActionWebService::Client::XmlRpc.new self, endpoint_uri, options
+ end
+ end
+ end
+
module Protocol # :nodoc:
module XmlRpc # :nodoc:
def self.included(base)