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 advance for all advises.
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
...
if (!checkMsg()) {
// return SOAP response
}
...
}
The
SOAPExceptioncannot be created in theFilter. I have to throwSerlvetException. If I want to return theSOAPException, I have to chainCXF servletand throw it there.