protected void doProcess(Packet packet) throws SAXException { getValidator().reset(); Class<? extends ValidationErrorHandler> handlerClass = feature.getErrorHandler(); ValidationErrorHandler handler; try { handler = handlerClass.newInstance(); } catch(Exception e) { throw new WebServiceException(e); } handler.setPacket(packet); getValidator().setErrorHandler(handler); Message msg = packet.getMessage().copy(); Source source = msg.readPayloadAsSource(); try { // Validator javadoc allows ONLY SAX, and DOM Sources // But the impl seems to handle all kinds. getValidator().validate(source); } catch(IOException e) { throw new WebServiceException(e); } }
protected void doProcess(Packet packet) throws SAXException { getValidator().reset(); Class<? extends ValidationErrorHandler> handlerClass = feature.getErrorHandler(); ValidationErrorHandler handler; try { handler = handlerClass.newInstance(); } catch(Exception e) { throw new WebServiceException(e); } handler.setPacket(packet); getValidator().setErrorHandler(handler); Message msg = packet.getMessage().copy(); Source source = msg.readPayloadAsSource(); try { // Validator javadoc allows ONLY SAX, and DOM Sources // But the impl seems to handle all kinds. getValidator().validate(source); } catch(IOException e) { throw new WebServiceException(e); } }
protected void doProcess(Packet packet) throws SAXException { getValidator().reset(); Class<? extends ValidationErrorHandler> handlerClass = feature.getErrorHandler(); ValidationErrorHandler handler; try { handler = handlerClass.newInstance(); } catch(Exception e) { throw new WebServiceException(e); } handler.setPacket(packet); getValidator().setErrorHandler(handler); Message msg = packet.getMessage().copy(); Source source = msg.readPayloadAsSource(); try { // Validator javadoc allows ONLY SAX, and DOM Sources // But the impl seems to handle all kinds. getValidator().validate(source); } catch(IOException e) { throw new WebServiceException(e); } }