Hello All,
I was getting the error: "Problem writing SAAJ model to stream".  This error
isn't very descriptive and I had to dig a little to find the root cause. 
There was a similar issue here for Connection Refused:

https://issues.apache.org/jira/browse/CXF-3872

To find the root cause of my error, I downloaded the CXF source and then
added some debug statements to the SAAJOutInterceptor: 

                try {
                    if (writer != null) {
                        StaxUtils.copy(new
W3CDOMStreamReader(soapMessage.getSOAPPart()), writer);
                        writer.flush();
                        message.setContent(XMLStreamWriter.class, writer);
                    }
                } catch (XMLStreamException e) {
                    if (e.getCause() instanceof ConnectException) {
                        throw new SoapFault(e.getCause().getMessage(), e,
                                           
message.getVersion().getSender());
                    } else {
*                        e.printStackTrace();
                        System.out.println(e.getCause().getClass()); *
                        throw new SoapFault(new Message("SOAPEXCEPTION",
BUNDLE), e,
                                           
message.getVersion().getSender());
                    }

I realize that printing the stack track is not the most graceful way to get
at the error which in my case happened to be a truststore/SSL issue.  Is
there a way to provide a better error message than "Problem writing SAAJ
model to stream"?    Maybe it is sufficient to just use
e.getCause().getMessage() in all cases?

Thanks,
Yogesh



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Problem-writing-SAAJ-model-to-stream-tp5725406.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to