Changeset 1893
- Timestamp:
- 07/21/07 12:54:01 (1 year ago)
- Files:
-
- trunk/lib/soap/rpc/element.rb (modified) (3 diffs)
- trunk/lib/soap/wsdlDriver.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/soap/rpc/element.rb
r1836 r1893 220 220 def init_param(param_def) 221 221 param_def.each do |io_type, name, param_type| 222 mapped_class, nsdef, namedef = param_type 223 if mapped_class.is_a?(String) 224 mapped_class = Mapping.class_from_name(mapped_class) 225 end 222 mapped_class, nsdef, namedef = SOAPMethod.parse_param_type(param_type) 226 223 if nsdef && namedef 227 224 type_qname = XSD::QName.new(nsdef, namedef) … … 244 241 end 245 242 @retval_name = name 246 @retval_class_name = nil247 243 @retval_class_name = mapped_class 248 244 else … … 250 246 end 251 247 end 248 end 249 250 def self.parse_param_type(param_type) 251 mapped_class, nsdef, namedef = param_type 252 # the first element of typedef in param_def can be a String like 253 # "::SOAP::SOAPStruct" or "CustomClass[]". turn this String to a class if 254 # we can. 255 if mapped_class.is_a?(String) 256 if /\[\]\Z/ =~ mapped_class 257 # when '[]' is added, ignore this. 258 mapped_class = nil 259 else 260 mapped_class = Mapping.class_from_name(mapped_class) 261 end 262 end 263 [mapped_class, nsdef, namedef] 252 264 end 253 265 end trunk/lib/soap/wsdlDriver.rb
r1833 r1893 27 27 def initialize(wsdl) 28 28 @wsdl = import(wsdl) 29 @methoddefcreator = WSDL::SOAP::MethodDefCreator.new(@wsdl, nil )29 @methoddefcreator = WSDL::SOAP::MethodDefCreator.new(@wsdl, nil, {}) 30 30 end 31 31 … … 134 134 # the first element of typedef in param_def is a String like 135 135 # "::SOAP::SOAPStruct". turn this String to a class. 136 param_def.collect { |io, name, typedef| 137 typedef[0] = Mapping.class_from_name(typedef[0]) if typedef[0] 138 [io, name, typedef] 136 param_def.collect { |io_type, name, param_type| 137 [io_type, name, ::SOAP::RPC::SOAPMethod.parse_param_type(param_type)] 139 138 } 140 139 end