0

I am making a client like this:

client = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver

And I get a SOAP::RPC::Driver class...

how do i tell it to close itself?

asdasd
  • 5,099
  • 2
  • 16
  • 7

2 Answers2

1

Answering for folks who visit this link looking for an answer to this (even though the qn is 2 yrs old).

Knowing soap4r version and ruby version would have solidified my answer, but if you are using soap4r (1.5.5 or 1.5.8) and Ruby (1.8.7 or above) the connection to the remote end point is made either but httpclient (gem) or the inbuilt netHttpClient (netHttpClient.rb file in the soap4r gem). Both use start and post methods of HTTP via a block to send the the request and receive the response. And when a http connection is started via a block it closes as soon as the block ends.

Reference and further reading

Community
  • 1
  • 1
MPK
  • 133
  • 2
  • 9
0

I believe it opens and closes the socket internally for each request or batch. I hate to say "don't worry about it, let GC clean it up", but I think that is actually the correct answer since it manages its own connections.

According to This there is no close method.

EnabrenTane
  • 7,428
  • 2
  • 26
  • 44