Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1817

Show
Ignore:
Timestamp:
05/29/07 22:20:26 (2 years ago)
Author:
nahi
Message:
  • oneway service should return 202 Accepted / service client should accept it. closes #347.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/soap/rpc/router.rb

    r1803 r1817  
    180180    header = call_headers(headerhandler) 
    181181    if op.response_use.nil? 
    182       conn_data.send_string = "" 
     182      conn_data.send_string = '' 
     183      conn_data.is_nocontent = true 
    183184      conn_data 
    184185    else 
  • trunk/lib/soap/rpc/soaplet.rb

    r1597 r1817  
    115115 
    116116  def setup_res(conn_data, req, res) 
     117    if conn_data.is_nocontent 
     118      res.status = WEBrick::HTTPStatus::RC_ACCEPTED 
     119      res.body = '' 
     120      return 
     121    end 
    117122    res['content-type'] = conn_data.send_contenttype 
    118123    if conn_data.is_fault 
  • trunk/lib/soap/streamHandler.rb

    r1777 r1817  
    2929    attr_accessor :receive_contenttype 
    3030    attr_accessor :is_fault 
     31    attr_accessor :is_nocontent 
    3132    attr_accessor :soapaction 
    3233 
     
    3738      @receive_contenttype = nil 
    3839      @is_fault = false 
     40      @is_nocontent = false 
    3941      @soapaction = nil 
    4042    end 
     
    224226    when 405 
    225227      raise PostUnavailableError.new("#{ res.status }: #{ res.reason }") 
    226     when 200, 500 
    227       # Nothing to do. 
     228    when 200, 202, 500 
     229      # Nothing to do.  202 is for oneway service. 
    228230    else 
    229231      raise HTTPStreamError.new("#{ res.status }: #{ res.reason }")