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 --- .../lib/action_web_service/client/soap_client.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'actionwebservice/lib/action_web_service/client/soap_client.rb') diff --git a/actionwebservice/lib/action_web_service/client/soap_client.rb b/actionwebservice/lib/action_web_service/client/soap_client.rb index b93f6475d9..d3975d89a2 100644 --- a/actionwebservice/lib/action_web_service/client/soap_client.rb +++ b/actionwebservice/lib/action_web_service/client/soap_client.rb @@ -24,14 +24,16 @@ module ActionWebService # :nodoc: # will be sent with HTTP POST. # # Valid options: - # [:service_name] If the remote server has used a custom +wsdl_service_name+ - # option, you must specify it here + # [:type_namespace] If the remote server has used a custom namespace to + # declare its custom types, you can specify it here + # [:method_namespace] If the remote server has used a custom namespace to + # declare its methods, you can specify it here def initialize(api, endpoint_uri, options={}) super(api, endpoint_uri) - @service_name = options[:service_name] - @namespace = @service_name ? '' : "urn:#{@service_name}" - @marshaler = WS::Marshaling::SoapMarshaler.new - @encoder = WS::Encoding::SoapRpcEncoding.new + @type_namespace = options[:type_namespace] || 'urn:ActionWebService' + @method_namespace = options[:method_namespace] || 'urn:ActionWebService' + @marshaler = WS::Marshaling::SoapMarshaler.new @type_namespace + @encoder = WS::Encoding::SoapRpcEncoding.new @method_namespace @soap_action_base = options[:soap_action_base] @soap_action_base ||= URI.parse(endpoint_uri).path @driver = create_soap_rpc_driver(api, endpoint_uri) @@ -53,7 +55,7 @@ module ActionWebService # :nodoc: driver.mapping_registry = @marshaler.registry api.api_methods.each do |name, info| public_name = api.public_api_method_name(name) - qname = XSD::QName.new(@namespace, public_name) + qname = XSD::QName.new(@method_namespace, public_name) action = soap_action(public_name) expects = info[:expects] returns = info[:returns] -- cgit v1.2.3