i'm building a web service in which i added an interceptor to verify the size
of the response sent to client. In case the size exceeds the limit there's
an exception thrown with a soap fault sent to client, but in my case the
response sent is empty

final OutputStream out = message.getContent(OutputStream.class);
        final CachedOutputStream cout = new CachedOutputStream() {
            public void close() throws IOException {
                if (size() > 300) {
                    throw new SoapFault("error", new QName("fault"));
                }
                resetOut(out, false);
                writeCacheTo(out);
            }
        };
        message.put(Message.EXCEPTION_MESSAGE_CAUSE_ENABLED, new
SoapFault("error", new QName("fault")));
        message.setContent(OutputStream.class, cout);

any help would be appreciated



--
View this message in context: 
http://cxf.547215.n5.nabble.com/why-is-my-SoapFault-not-sent-to-client-tp5713905.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to