SOAP::RPC::StandaloneServer failed in the thread

C

cyl

I wrote a simple soap server as below

NS = 'http://Test.com/Test';
class Server < SOAP::RPC::StandaloneServer
def on_init
t = TestClass.new
add_method(t, 'echo')
end
end
svr = Server.new('TEST',NS,'0.0.0.0',12321)
trap('INT') {svr.shutdown}
svr.start

it can run without problem. However if I run the same piece of code in
a thread, it will not work

Thread.new do

#same code here

end
#wait for the thread

I think the server does not start because the listening port I
specified is not occupied by any application. Does anyone know what
the problem is?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top