Confusing error message "Problem writing SAAJ model to stream" in case if
service not avalable (patch)
------------------------------------------------------------------------------------------------------
Key: CXF-3872
URL: https://issues.apache.org/jira/browse/CXF-3872
Project: CXF
Issue Type: Improvement
Components: Core
Affects Versions: 2.5
Environment: Windows
Reporter: Andrei Shakirin
Priority: Minor
Hi,
Issue was discussed in user list:
http://www.mail-archive.com/[email protected]/msg22444.html
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$SAAJOutEndingInterceptor.ha
ndleMessage(SAAJOutInterceptor.java:214)[132:org.apache.cxf.bundle:2.4.2]
at
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.ha
ndleMessage(SAAJOutInterceptor.java:170)[132:org.apache.cxf.bundle:2.4.2]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.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)
Patch is attached.
Regards,
Andrei.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira