Changeset 1973
- Timestamp:
- 09/17/07 21:14:58 (8 months ago)
- Files:
-
- trunk/lib/soap/element.rb (modified) (2 diffs)
- trunk/lib/soap/header/handler.rb (modified) (1 diff)
- trunk/test/soap/test_custom_ns.rb (modified) (2 diffs)
- trunk/test/soap/test_extraattr.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/soap/element.rb
r1936 r1973 170 170 @element.extraattr[key] = value 171 171 end 172 @element.extraattr[AttrMustUnderstandName] = (@mustunderstand ? '1' : '0') 172 # to remove mustUnderstand attribute, set it to nil 173 unless @mustunderstand.nil? 174 @element.extraattr[AttrMustUnderstandName] = (@mustunderstand ? '1' : '0') 175 end 173 176 if @encodingstyle 174 177 @element.extraattr[AttrEncodingStyleName] = @encodingstyle … … 208 211 def add(name, value) 209 212 actor = value.extraattr[AttrActorName] 210 mu = (value.extraattr[AttrMustUnderstandName] == '1')213 mu = value.extraattr[AttrMustUnderstandName] 211 214 encstyle = value.extraattr[AttrEncodingStyleName] 212 item = SOAPHeaderItem.new(value, mu, encstyle, actor) 215 mu_value = mu.nil? ? nil : (mu == '1') 216 # to remove mustUnderstand attribute, set it to nil 217 item = SOAPHeaderItem.new(value, mu_value, encstyle, actor) 213 218 super(name, item) 214 219 end trunk/lib/soap/header/handler.rb
r1833 r1973 16 16 class Handler 17 17 attr_reader :elename 18 attr_ reader :mustunderstand18 attr_accessor :mustunderstand 19 19 attr_reader :encodingstyle 20 20 attr_reader :target_actor trunk/test/soap/test_custom_ns.rb
r1954 r1973 13 13 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 14 14 <env:Header> 15 <n1:headeritem xmlns:n1="my:foo" 16 env:mustUnderstand="0">hi</n1:headeritem> 15 <n1:headeritem xmlns:n1="my:foo">hi</n1:headeritem> 17 16 </env:Header> 18 17 <env:Body> … … 31 30 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 32 31 <ENV:Header> 33 <myns:headeritem ENV:mustUnderstand="0">hi</myns:headeritem>32 <myns:headeritem>hi</myns:headeritem> 34 33 </ENV:Header> 35 34 <ENV:Body> trunk/test/soap/test_extraattr.rb
r1970 r1973 15 15 <env:Header Id="extraattr"> 16 16 <n1:headeritem xmlns:n1="my:foo" 17 env:mustUnderstand="0"18 17 Id="extraattr"></n1:headeritem> 19 18 </env:Header>