Changeset 1670
- Timestamp:
- 11/14/05 22:13:15 (3 years ago)
- Files:
-
- trunk/lib/soap/element.rb (modified) (4 diffs)
- trunk/lib/soap/header/handler.rb (modified) (3 diffs)
- trunk/lib/soap/rpc/httpserver.rb (modified) (2 diffs)
- trunk/lib/soap/rpc/proxy.rb (modified) (1 diff)
- trunk/lib/soap/rpc/router.rb (modified) (1 diff)
- trunk/lib/soap/soap.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/soap/element.rb
r1580 r1670 152 152 attr_accessor :mustunderstand 153 153 attr_accessor :encodingstyle 154 155 def initialize(element, mustunderstand = true, encodingstyle = nil) 154 attr_accessor :actor 155 156 def initialize(element, mustunderstand = true, encodingstyle = nil, actor = nil) 156 157 super() 157 158 @type = nil … … 159 160 @mustunderstand = mustunderstand 160 161 @encodingstyle = encodingstyle 162 @actor = actor 161 163 element.parent = self if element 162 164 end … … 171 173 @element.extraattr[ns.name(AttrEncodingStyleName)] = @encodingstyle 172 174 end 173 @element.encodingstyle = @encodingstyle if !@element.encodingstyle 175 unless @element.encodingstyle 176 @element.encodingstyle = @encodingstyle 177 end 178 if @actor 179 @element.extraattr[ns.name(AttrActorName)] = @actor 180 end 174 181 yield(@element) 175 182 end … … 196 203 197 204 def add(name, value) 205 actor = value.extraattr[AttrActorName] 198 206 mu = (value.extraattr[AttrMustUnderstandName] == '1') 199 207 encstyle = value.extraattr[AttrEncodingStyleName] 200 item = SOAPHeaderItem.new(value, mu, encstyle )208 item = SOAPHeaderItem.new(value, mu, encstyle, actor) 201 209 super(name, item) 202 210 end trunk/lib/soap/header/handler.rb
r1520 r1670 18 18 attr_reader :mustunderstand 19 19 attr_reader :encodingstyle 20 attr_reader :target_actor 20 21 21 22 def initialize(elename) … … 23 24 @mustunderstand = false 24 25 @encodingstyle = nil 26 @target_actor = nil 25 27 end 26 28 … … 44 46 else 45 47 item.elename = @elename 46 ::SOAP::SOAPHeaderItem.new(item, @mustunderstand, @encodingstyle) 48 ::SOAP::SOAPHeaderItem.new(item, @mustunderstand, @encodingstyle, 49 @target_actor) 47 50 end 48 51 end trunk/lib/soap/rpc/httpserver.rb
r1520 r1670 22 22 23 23 def initialize(config) 24 super(config[:SOAPHTTPServerApplicationName] || self.class.name) 24 actor = config[:SOAPHTTPServerApplicationName] || self.class.name 25 super(actor) 25 26 @default_namespace = config[:SOAPDefaultNamespace] 26 27 @webrick_config = config.dup … … 28 29 @webrick_config[:Logger] ||= @log 29 30 @log = @webrick_config[:Logger] # sync logger of App and HTTPServer 30 @router = ::SOAP::RPC::Router.new( self.class.name)31 @router = ::SOAP::RPC::Router.new(actor) 31 32 @soaplet = ::SOAP::RPC::SOAPlet.new(@router) 32 33 on_init trunk/lib/soap/rpc/proxy.rb
r1665 r1670 265 265 end 266 266 267 def create_header(headers)268 header = SOAPHeader.new()269 headers.each do |content, mustunderstand, encodingstyle|270 header.add(SOAPHeaderItem.new(content, mustunderstand, encodingstyle))271 end272 header273 end274 275 267 def create_encoding_opt(hash = nil) 276 268 opt = {} trunk/lib/soap/rpc/router.rb
r1669 r1670 325 325 faultcode = FaultCode::Server 326 326 end 327 328 327 detail = Mapping::SOAPException.new(e) 329 328 SOAPFault.new( trunk/lib/soap/soap.rb
r1669 r1670 49 49 EleFaultCodeName = XSD::QName.new(nil, EleFaultCode).freeze 50 50 EleFaultDetailName = XSD::QName.new(nil, EleFaultDetail).freeze 51 AttrActorName = XSD::QName.new(EnvelopeNamespace, AttrActor).freeze 51 52 AttrMustUnderstandName = XSD::QName.new(EnvelopeNamespace, AttrMustUnderstand).freeze 52 53 AttrEncodingStyleName = XSD::QName.new(EnvelopeNamespace, AttrEncodingStyle).freeze