dev@jax-ws.java.net

e.printStackTrace() in EndpointMethodHandler

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Thu, 23 Feb 2006 13:14:29 -0800

In the EndpointMethodHandler we have the following code:

            try {
                Object ret = method.invoke(proxy, args);
                responseMessage = isOneWay ? null :
createResponseMessage(args, ret);
            } catch (InvocationTargetException e) {
                e.printStackTrace();
                Throwable cause = e.getCause();
                if (cause != null && !(cause instanceof
RuntimeException) && cause instanceof Exception) {
                    // Service specific exception
                    responseMessage =
SOAPFaultBuilder.createSOAPFaultMessage(soapVersion,
                            
javaMethodModel.getCheckedException(cause.getClass()), cause);
                } else {
                    responseMessage =
SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, cause);
                }
            } catch (Exception e) {
                e.printStackTrace();
                responseMessage =
SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, e);
            }

can we just log the e.printStackTrace rather than printing it out to the
console?

-- 
 - Doug