in reply to Waiting for a response

You can pass a "timeout" value to LWP::UserAgent->new(). See LWP::UserAgent. Or else you could rewrite that lame WebLogic Java code so it isn't so slow.