You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Niek Palm (JIRA)" <ji...@apache.org> on 2010/08/11 14:41:17 UTC
[jira] Reopened: (CXF-2384) SOAPFaultExcption thrown instead of a
WebServiceException
[ https://issues.apache.org/jira/browse/CXF-2384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niek Palm reopened CXF-2384:
----------------------------
I test the solution against 2.2.7 and 2.2.9, it seems still not fixed.
I test the the solution by calling a not running service. We still get a SOAPFaultException which means that there is a SOAPFault. Since the service cannot be called there is no SOAPFault. The correct solution should be throw an exception that is a instance of WebServiceException based on a ConnectionException in stead of throwing an SOAPFaultException based on a ConnectionException.
So here a CXF code snippet.
class: org.apache.cxf.jaxws.DispatchImpl
...
private RuntimeException mapException(Exception ex) {
if (ex instanceof Fault && ex.getCause() instanceof IOException) {
throw new WebServiceException(ex.getMessage(), ex.getCause());
}
should be changed to some like:
...
private RuntimeException mapException(Exception ex) {
if (ex instanceof Fault && (ex.getCause() instanceof IOException || ex.getCause() instanceof ConnectionException)) {
throw new WebServiceException(ex.getMessage(), ex.getCause());
}
Maybe there is no need (anymore to check against an IOExcption
> SOAPFaultExcption thrown instead of a WebServiceException
> ---------------------------------------------------------
>
> Key: CXF-2384
> URL: https://issues.apache.org/jira/browse/CXF-2384
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.2.2
> Environment: jdk1.6, ubuntu 9.10
> Reporter: Niek Palm
> Assignee: Daniel Kulp
> Fix For: 2.2.7
>
>
> When the connection of the webservice is lost we get a SoapFaultException instead of of a WebServiceException. We use the dispachter in the following way:
>
> Service service = Service.create(SERVICE_NAME);
> service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, url.toString());
> Dispatch<SOAPMessage> dispatch = service.createDispatch(PORT_NAME, SOAPMessage.class, Service.Mode.MESSAGE);
> SOAPMessage response = dispatch.invoke(request);
> Looking in the API (http://java.sun.com/javase/6/docs/api/javax/xml/ws/Dispatch.html#invoke(T)), there is specified that any communication problem will cause in a WebServiceException. To our point of view this is a bug in cxf.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.