With the following code (I'm a using JAXM-Simple example), how might I fail this nicely if the message doesn't go through within say 15 seconds. I mean, I can figure out how to throw the exception after 15 seconds, but assuming I do this is the message still queued (and would it be delivered if at the 20th second it was finally able to get through.) I know about using a Remote Provider to asynchronously send messages, but was wonder what I could do to solve this immediate problem. TIA
String to="http://209.11.9.208:8080/jaxm-simple/receiver"; URLEndpoint urlEndpoint = new URLEndpoint(to); // Send the message to the provider using the connection. SOAPMessage reply = con.call(msg, urlEndpoint); if (reply != null) { retval += "MSG SENT REPLY RECEIVED</H4></html>"; } else { retval += "MSG SENT REPLY NOT RECEIVED</H4> </html>"; } } catch(Throwable e) { e.printStackTrace(); retval += "MSG NOT SENT OR NOT RECEIVED</H4> </html>"; }