#!/usr/bin/env ruby
require "socket"
gs = TCPserver.open(8082)
while true
  Thread.start(gs.accept) do |s|
    print(s, " is accepted\n")
    while s.gets
      s.write "Content-type: application/xml+soap\n\n"
      s.write($_)
      print "LOG: #{$_}\n" 
    end
  s.close
  end
end
