Dear Wiki user, You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.
The following page has been changed by RodrigoRuiz: http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration/InterruptCalls The comment on the change is: Improved exception handling in invoke() ------------------------------------------------------------------------------ /** * [EMAIL PROTECTED] */ - @Override public void invoke(MessageContext msgContext) throws AxisFault { + @Override public void invoke(MessageContext ctx) throws AxisFault { + Thread t = Thread.currentThread(); try { super.invoke(msgContext); } catch (AxisFault fault) { - Thread t = Thread.currentThread(); + Throwable cause = fault.getCause(); - if (fault.getCause() instanceof SocketException && t.isInterrupted()) { + if (cause instanceof SocketException && t.isInterrupted()) { + InterruptedException ie = new InterruptedException(); + ie.setStackTrace(cause.getStackTrace()); - fault = AxisFault.makeFault(new InterruptedException()); + fault = AxisFault.makeFault(ie); } throw fault; } finally { - SOCKETS.remove(Thread.currentThread()); + SOCKETS.remove(t); } } /** * [EMAIL PROTECTED] */ - @Override protected void getSocket(SocketHolder sockHolder, MessageContext msgContext, + @Override protected void getSocket(SocketHolder sock, MessageContext ctx, String protocol, String host, int port, int timeout, StringBuffer otherHeaders, BooleanHolder useFullURL) throws Exception { - super.getSocket(sockHolder, msgContext, protocol, host, port, + super.getSocket(sock, ctx, protocol, host, port, timeout, otherHeaders, useFullURL); - SOCKETS.put(Thread.currentThread(), sockHolder.getSocket()); + SOCKETS.put(Thread.currentThread(), sock.getSocket()); } } }}} --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
