[ https://issues.apache.org/jira/browse/CXF-2384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905486#action_12905486 ]
Jonathan Anstey commented on CXF-2384: -------------------------------------- Hi Dan, I don't want to make this any more confusing but there seems to be a mismatch between the spec and the javadoc... the spec says the following about a failed dispatch: {quote} 4.3.1 Configuration ... Conformance (Failed Dispatch.invoke): When an operation is invoked using an invoke method, an implementation MUST throw a WebServiceException if there is any error in the configuration of the Dispatch instance or a ProtocolException if an error occurs during the remote operation invocation. {quote} whereas the javadoc, as was pointed out in an earlier comment, says: {quote} Throws: WebServiceException - If a fault occurs during communication with the service WebServiceException - If there is any error in the configuration of the Dispatch instance {quote} Technically, a ProtocolException IS a WebServiceException but you would have thought that the javadoc would have said that {quote} Throws: ProtocolException - If a fault occurs during communication with the service WebServiceException - If there is any error in the configuration of the Dispatch instance {quote} Wondering if this is a "bug" in the javadoc or if they just loosened the requirement a bit. Any thoughts? Cheers, Jon > 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.