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 --- .../action_web_service/protocol/soap_protocol/marshaler.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'actionwebservice/lib/action_web_service/protocol/soap_protocol') diff --git a/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb b/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb index 78eee620eb..b36e029669 100644 --- a/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb +++ b/actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb @@ -17,11 +17,11 @@ module ActionWebService end class SoapMarshaler - attr :type_namespace + attr :namespace attr :registry - def initialize(type_namespace=nil) - @type_namespace = type_namespace || 'urn:ActionWebService' + def initialize(namespace=nil) + @namespace = namespace || 'urn:ActionWebService' @registry = Registry.new @type2binding = {} register_static_factories @@ -46,7 +46,7 @@ module ActionWebService qname ||= soap_base_type_name(mapping[0]) type_binding = SoapBinding.new(self, qname, type_type, mapping) else - qname = XSD::QName.new(@type_namespace, soap_type_name(type_class.name)) + qname = XSD::QName.new(@namespace, soap_type_name(type_class.name)) @registry.add(type_class, SOAP::SOAPStruct, typed_struct_factory(type_class), @@ -58,7 +58,7 @@ module ActionWebService array_binding = nil if type.array? array_mapping = @registry.find_mapped_soap_class(Array) - qname = XSD::QName.new(@type_namespace, soap_type_name(type.element_type.type_class.name) + 'Array') + qname = XSD::QName.new(@namespace, soap_type_name(type.element_type.type_class.name) + 'Array') array_binding = SoapBinding.new(self, qname, type, array_mapping, type_binding) end @@ -88,7 +88,7 @@ module ActionWebService def typed_struct_factory(type_class) if Object.const_defined?('ActiveRecord') if type_class.ancestors.include?(ActiveRecord::Base) - qname = XSD::QName.new(@type_namespace, soap_type_name(type_class.name)) + qname = XSD::QName.new(@namespace, soap_type_name(type_class.name)) type_class.instance_variable_set('@qname', qname) return SoapActiveRecordStructFactory.new end -- cgit v1.2.3