private void validateFault(SoapMessage message, SOAPFault fault, BindingOperationInfo bop) { if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, message)) { Schema schema = EndpointReferenceUtils.getSchema(message.getExchange().getService() .getServiceInfos().get(0), message.getExchange().getBus()); Detail d = fault.getDetail(); try { validateFaultDetail(d, schema, bop); } catch (Exception e) { throw new SoapFault(e.getMessage(), e, message.getVersion().getReceiver()); } //We validated what we can from a fault standpoint message.put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.FALSE); } }
protected boolean shouldValidate(Message message) { return ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message); }
protected boolean shouldValidate(Message message) { return ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message); }
protected boolean shouldValidate(Message m) { return ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, m); }
protected boolean shouldValidate(Message message) { return ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message); }
protected boolean shouldValidate(Message m) { return ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, m); }
protected boolean shouldValidate(Message m) { return ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, m); }
protected boolean shouldValidate(Message message) { return ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message); }
= service.getDataBinding().createWriter(XMLStreamWriter.class); if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, message)) { Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus());
protected boolean shouldValidate(Message m) { return ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, m); }
message.setContent(XMLStreamWriter.class, writer); } else if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, message) && Source.class.isAssignableFrom(type)) {
if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, message) && helper instanceof AbstractWrapperHelper) { ((AbstractWrapperHelper)helper).setValidate(true);
private void setDataWriterValidation(Service service, Message message, DataWriter<?> writer) { if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, message)) { Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus()); writer.setSchema(schema); } }
private void setDataWriterValidation(Service service, Message message, DataWriter<?> writer) { if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, message)) { Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message.getExchange().getBus()); writer.setSchema(schema); } }
private void setSchemaInMessage(Message message, XMLStreamReader reader) throws XMLStreamException { if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message)) { try { WoodstoxValidationImpl mgr = new WoodstoxValidationImpl(); if (mgr.canValidate()) { mgr.setupValidation(reader, message.getExchange().getEndpoint(), message.getExchange().getService().getServiceInfos().get(0)); } } catch (Throwable t) { //likely no MSV or similar LOG.log(Level.FINE, "Problem initializing MSV validation", t); } } } }
private void setSchemaInMessage(Message message, XMLStreamReader reader) throws XMLStreamException { if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message)) { try { WoodstoxValidationImpl mgr = new WoodstoxValidationImpl(); if (mgr.canValidate()) { mgr.setupValidation(reader, message.getExchange().getEndpoint(), message.getExchange().getService().getServiceInfos().get(0)); } } catch (Throwable t) { //likely no MSV or similar LOG.log(Level.FINE, "Problem initializing MSV validation", t); } } } }
private void setSchemaInMessage(Message message, XMLStreamWriter writer) throws XMLStreamException { if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, message)) { try { WoodstoxValidationImpl mgr = new WoodstoxValidationImpl(); if (mgr.canValidate()) { mgr.setupValidation(writer, message.getExchange().getEndpoint(), message.getExchange().getService().getServiceInfos().get(0)); } } catch (Throwable t) { //likely no MSV or similar LOG.log(Level.FINE, "Problem initializing MSV validation", t); } } } }
private void setSchemaInMessage(Message message, XMLStreamWriter writer) throws XMLStreamException { if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, message)) { try { WoodstoxValidationImpl mgr = new WoodstoxValidationImpl(); if (mgr.canValidate()) { mgr.setupValidation(writer, message.getExchange().getEndpoint(), message.getExchange().getService().getServiceInfos().get(0)); } } catch (Throwable t) { //likely no MSV or similar LOG.log(Level.FINE, "Problem initializing MSV validation", t); } } } }
public void handleMessage(Message message) throws Fault { // This assumes that this interceptor is only use in IN / IN Fault chains. if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message) && message.getAttachments() != null) { Collection<AttachmentDataSource> dss = new ArrayList<>(); for (Attachment at : message.getAttachments()) { if (at.getDataHandler().getDataSource() instanceof AttachmentDataSource) { AttachmentDataSource ds = (AttachmentDataSource)at.getDataHandler().getDataSource(); try { ds.hold(message); } catch (IOException e) { throw new Fault(e); } dss.add(ds); } } if (!dss.isEmpty()) { message.put(SAVED_DATASOURCES, dss); message.getInterceptorChain().add(EndingInterceptor.INSTANCE); } } }
private void validateFault(SoapMessage message, SOAPFault fault, BindingOperationInfo bop) { if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.OUT, message)) { Schema schema = EndpointReferenceUtils.getSchema(message.getExchange().getService() .getServiceInfos().get(0), message.getExchange().getBus()); Detail d = fault.getDetail(); try { validateFaultDetail(d, schema, bop); } catch (Exception e) { throw new SoapFault(e.getMessage(), e, message.getVersion().getReceiver()); } //We validated what we can from a fault standpoint message.put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.FALSE); } }