Petals SE JSR181

Technical errors should NOT be transformed to Fault

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.4.2
  • Fix Version/s: 1.5.0
  • Component/s: None
  • Security Level: Public
  • Description:

    See PETALSDISTRIB-133.

    In Jsr181JBIListener, some errors are transformed to faults.

  • Environment:
    -

Issue Links

Activity

Hide
Victor NOËL added a comment - Thu, 21 May 2015 - 14:49:46 +0200

Furthermore,

Axis2 also has a problem: it does not transform correctly a checked exception thrown by a @WebMethod method (corresponding to an expected Fault in the corresponding WSDL): it makes AxisFault as desired but the cause is not the expected exception (and the field of the AxisFault are not well completed).

For example, when testing by adding an home-made exception to the example hello service, the fault created by Axis2 is:

<soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode xmlns:fcns="http://petals.ow2.org/cdk/defaultFault">fcns:0</faultcode>
<faultstring>null message</faultstring>
<faultactor/>
<detail>
<stackTrace>org.apache.axis2.AxisFault
at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.createFaultResponse(JavaBeanDispatcher.java:348)
at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:109)
at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointController.java:109)
at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:159)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
at org.ow2.petals.se.jsr181.Jsr181JBIListener.onJBIMessage(Jsr181JBIListener.java:155)
at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:746)
at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:476)
at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:325)
at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:252)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:76)
at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:96)
... 11 more
Caused by: org.ow2.petals.se.jsr181.test.HelloWorldException: Victor is not welcome!
at org.ow2.petals.se.jsr181.test.HelloWorldService.sayHello(HelloWorldService.java:38)
... 17 more
</stackTrace>
</detail>
</soapenv:Fault>

Show
Victor NOËL added a comment - Thu, 21 May 2015 - 14:49:46 +0200 Furthermore, Axis2 also has a problem: it does not transform correctly a checked exception thrown by a @WebMethod method (corresponding to an expected Fault in the corresponding WSDL): it makes AxisFault as desired but the cause is not the expected exception (and the field of the AxisFault are not well completed). For example, when testing by adding an home-made exception to the example hello service, the fault created by Axis2 is: <soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <faultcode xmlns:fcns="http://petals.ow2.org/cdk/defaultFault">fcns:0</faultcode> <faultstring>null message</faultstring> <faultactor/> <detail> <stackTrace>org.apache.axis2.AxisFault at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.createFaultResponse(JavaBeanDispatcher.java:348) at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:109) at org.apache.axis2.jaxws.server.EndpointController.invoke(EndpointController.java:109) at org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:159) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173) at org.ow2.petals.se.jsr181.Jsr181JBIListener.onJBIMessage(Jsr181JBIListener.java:155) at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:746) at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:476) at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:325) at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:252) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:76) at org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher.invoke(JavaBeanDispatcher.java:96) ... 11 more Caused by: org.ow2.petals.se.jsr181.test.HelloWorldException: Victor is not welcome! at org.ow2.petals.se.jsr181.test.HelloWorldService.sayHello(HelloWorldService.java:38) ... 17 more </stackTrace> </detail> </soapenv:Fault>
Hide
Victor NOËL added a comment - Wed, 15 Jul 2015 - 11:52:30 +0200

We must thus correctly catch the business Fault to set the Fault correctly.

The problem is maybe that using Axis, we HAVE to go through the SOAP format and through all the remote layers even though we stay in-memory… I'm wondering if this is the right tool for this job… this must be investigated.

Show
Victor NOËL added a comment - Wed, 15 Jul 2015 - 11:52:30 +0200 We must thus correctly catch the business Fault to set the Fault correctly. The problem is maybe that using Axis, we HAVE to go through the SOAP format and through all the remote layers even though we stay in-memory… I'm wondering if this is the right tool for this job… this must be investigated.
Hide
Victor NOËL added a comment - Wed, 15 Jul 2015 - 13:46:48 +0200

An issue has been created to handle this last point: PETALSSEJSR-30.

Show
Victor NOËL added a comment - Wed, 15 Jul 2015 - 13:46:48 +0200 An issue has been created to handle this last point: PETALSSEJSR-30.

People

Dates

  • Created:
    Tue, 28 Apr 2015 - 12:37:10 +0200
    Updated:
    Wed, 15 Jul 2015 - 13:46:52 +0200
    Resolved:
    Wed, 15 Jul 2015 - 13:46:52 +0200