diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-06-25 06:27:39 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-06-25 06:27:39 +0000 |
commit | ebb6fb09280f828258432223fd543de9dfda6370 (patch) | |
tree | 27a5aba70164b1a9d0264d8c04b4df14f49317e5 /actionwebservice/lib/action_web_service/protocol/soap_protocol | |
parent | af33a6a6b193f4470d2c072d6fa197b72c74001b (diff) | |
download | rails-ebb6fb09280f828258432223fd543de9dfda6370.tar.gz rails-ebb6fb09280f828258432223fd543de9dfda6370.tar.bz2 rails-ebb6fb09280f828258432223fd543de9dfda6370.zip |
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
Diffstat (limited to 'actionwebservice/lib/action_web_service/protocol/soap_protocol')
-rw-r--r-- | actionwebservice/lib/action_web_service/protocol/soap_protocol/marshaler.rb | 12 |
1 files changed, 6 insertions, 6 deletions
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 |