@Override public NextAction processResponse(Packet response) { if (isNoValidation() || !feature.isOutbound() || response.getMessage() == null || !response.getMessage().hasPayload() || response.getMessage().isFault()) { return super.processResponse(response); } try { doProcess(response); } catch (SAXException se) { // TODO: Should we convert this to fault Message ?? throw new WebServiceException(se); } return super.processResponse(response); }
@Override public NextAction processRequest(Packet request) { if (isNoValidation() || !feature.isInbound() || !request.getMessage().hasPayload() || request.getMessage().isFault()) { return super.processRequest(request); } try { doProcess(request); } catch (SAXException se) { LOGGER.log(Level.WARNING, "Client Request doesn't pass Service's Schema Validation", se); // Client request is invalid. So sending specific fault code // Also converting this to fault message so that handlers may get // to see the message. SOAPVersion soapVersion = binding.getSOAPVersion(); Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage( soapVersion, null, se, soapVersion.faultCodeClient); return doReturnWith(request.createServerResponse(faultMsg, wsdlPort, seiModel, binding)); } return super.processRequest(request); }