On Tuesday, October 18, 2011 10:58:09 AM Andrei Shakirin wrote: > Hi, > > Just to be sure that proposed improvement makes sense and has no drawbacks. > > use case: Dispatch client sends stream message to remote Web Service using > following code: > > final Dispatch<StaxSource> dispatch = service.createDispatch(PORT_NAME, > StaxSource.class, Service.Mode.MESSAGE); > final StaxSource response = dispatch.invoke(request); > > In case if remote service is just not available, code throws following > SoapFault: org.apache.cxf.binding.soap.SoapFault: Problem writing SAAJ > model to stream at > org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingIntercepto > r.ha > ndleMessage(SAAJOutInterceptor.java:214)[132:org.apache.cxf.bundle:2.4.2] > at > org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingIntercepto > r.ha > ndleMessage(SAAJOutInterceptor.java:170)[132:org.apache.cxf.bundle:2.4.2] > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai > n.ja va:263)[132:org.apache.cxf.bundle:2.4.2] > > To be honest, the error message is quite confusing, I expect "Connection > refused" exception here. > > The wrapped Exception is available: > Caused by: com.ctc.wstx.exc.WstxIOException: Connection refused: connect > at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:257) > > Question: does it make sense to explicitly check for connection refused case > in SAAJOutInterceptor (XMLStreamWriter.flush()) and provide more > understandable message for the user? I guess this error happens quite > often by the web applications. If yes, I am going to create Jira issue and > provide a patch.
I'm definitely ok with a patch for this. It probably should be some sort of IO exception. -- Daniel Kulp dk...@apache.org http://dankulp.com/blog Talend - http://www.talend.com