]
Thomas Diesler updated JBWS-1531:
---------------------------------
Fix Version/s: jbossws-3.x
(was: jbossws-3.0.1)
Support to create custom SOAP Fault from EJB3 Web Service
---------------------------------------------------------
Key: JBWS-1531
URL:
http://jira.jboss.com/jira/browse/JBWS-1531
Project: JBoss Web Services
Issue Type: Patch
Security Level: Public(Everyone can see)
Components: jbossws-native
Environment: not specific
Reporter: Vinay Kumar
Fix For: jbossws-3.x
At this moment, we cannot create custom SOAP fault from a EJB3 Web Service.
This exception handling logic is coded inside
org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper class. If you read the method
"exceptionToFaultMessage(Exception reqEx)", then you find that it is throwing
the same SOAPFaultException if it is receiving one. But, with EJB3 web service, every
exception is bundled inside EJBException & then thrown to container. As a result this
module only gets EJBException. So, that condition is not relevant to this scenario.
One way to this solution could be that you check if the argument is instanceof
EJBException then take the cause. And, if that cause is the custom SOAPFaultException;
then it becomes a small easy solution.
But, this is not sufficient. As you have exposed your SLSB as Web Service & we can
also access that bean through RMI.
And, SOAPFaultException cannot be raised through RMI; it raises some problem while
serlializing XML elements.
As a result, the last proposal also fades away.
Practically, we need something that checks if it is RMI raise the same exception & if
it is SOAP then create custom SOAPFault from the same.
Looking forward to your advice.
regards
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: