I have the code below and I need to return SOAP response (correct XML). If I throw new SoapException(...)
, it will return HTML page which is wrong. Thanks in a开发者_如何学Godvance for all advises.
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
...
if (!checkMsg()) {
// return SOAP response
}
...
}
The SOAPException
cannot be created in the Filter
. I have to throw SerlvetException
. If I want to return the SOAPException
, I have to chain CXF servlet
and throw it there.
精彩评论