[
http://jira.jboss.com/jira/browse/JBWS-2087?page=all ]
Alessio Soldano updated JBWS-2087:
----------------------------------
Fix Version/s: jbossws-metro-3.0.3
WSDL fault exception is wrapped in WebService exception when using
JbossWS-Metro.
---------------------------------------------------------------------------------
Key: JBWS-2087
URL:
http://jira.jboss.com/jira/browse/JBWS-2087
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: jbossws-metro
Affects Versions: jbossws-metro-3.0.0
Environment: JBoss AS 4.2.2
Reporter: Mattias ??hrn
Assigned To: Alessio Soldano
Fix For: jbossws-metro-3.0.3
When a web service implementation bean throws a contract exception it is wrapped in a
WebService exception.
The following stack trace appears in the server log:
11:21:25,122 ERROR [EndpointMethodHandler]
com.acme.metroexceptiontest.MetroTestException: Test msg
javax.xml.ws.WebServiceException: com.acme.metroexceptiontest.MetroTestException: Test
msg
at org.jboss.wsf.stack.sunri.InvokerEJB3.handleException(InvokerEJB3.java:117)
at org.jboss.wsf.stack.sunri.InvokerEJB3.invoke(InvokerEJB3.java:103)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106)
at org.jboss.wsf.stack.sunri.log.DumpPipe.process(DumpPipe.java:99)
at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
at org.jboss.wsf.stack.sunri.RequestHandlerImpl.doPost(RequestHandlerImpl.java:122)
at
org.jboss.wsf.stack.sunri.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:66)
at org.jboss.wsf.stack.sunri.EndpointServlet.service(EndpointServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.acme.metroexceptiontest.MetroTestException: Test msg
at
com.acme.metroexceptiontest.MetroTestServiceBean.helloWorld(MetroTestServiceBean.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
at
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
at
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103)
at org.jboss.wsf.stack.sunri.InvokerEJB3.invoke(InvokerEJB3.java:98)
... 40 more
A JAX-WS client accessing this web service throws a SOAPFaultException with the
WebServiceException as cause.
Below follows the simple web service I created to test this:
package com.acme.metroexceptiontest;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@Stateless
@WebService(
name="MetroTestService",
targetNamespace = "http://com.acme.metroexceptiontest/",
serviceName = "MetroTestService")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public class MetroTestServiceBean {
@WebMethod
public String helloWorld() throws MetroTestException {
throw new MetroTestException("Test msg", new MetroTestFaultInfo("test
detail"));
}
}
______________________________________________
package com.acme.metroexceptiontest;
import javax.xml.ws.WebFault;
@WebFault(name="MetroTestFault",
targetNamespace="http://com.acme.metroexceptiontest/")
public class MetroTestException extends Exception {
private static final long serialVersionUID = 1L;
private MetroTestFaultInfo faultInfo;
public MetroTestException(String message, MetroTestFaultInfo faultInfo) {
super(message);
this.faultInfo = faultInfo;
}
public MetroTestFaultInfo getFaultInfo() {
return faultInfo;
}
}
______________________________________________
package com.acme.metroexceptiontest;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
name = "MetroTestFaultInfo",
namespace="http://com.acme.metroexceptiontest/",
propOrder = { "detail" }
)
public class MetroTestFaultInfo {
protected String detail;
public MetroTestFaultInfo() {
}
public MetroTestFaultInfo(String detail) {
this.detail = detail;
}
public String getDetail() {
return detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira