Package org.springframework.xml.xsd

Examples of org.springframework.xml.xsd.SimpleXsdSchema


    }

    @Test
    public void testXsdSchema() throws Exception {
        PayloadValidatingInterceptor interceptor = new PayloadValidatingInterceptor();
        SimpleXsdSchema schema = new SimpleXsdSchema(new ClassPathResource(SCHEMA, getClass()));
        schema.afterPropertiesSet();
        interceptor.setXsdSchema(schema);
        interceptor.setValidateRequest(true);
        interceptor.setValidateResponse(true);
        interceptor.afterPropertiesSet();
        MockWebServiceMessage request = new MockWebServiceMessage();
View Full Code Here


    }

    @Test
    public void testXsdSchema() throws Exception {
        PayloadValidatingInterceptor interceptor = new PayloadValidatingInterceptor();
        SimpleXsdSchema schema = new SimpleXsdSchema(new ClassPathResource(SCHEMA, getClass()));
        schema.afterPropertiesSet();
        interceptor.setXsdSchema(schema);
        interceptor.setValidateRequest(true);
        interceptor.setValidateResponse(true);
        interceptor.afterPropertiesSet();
        MockWebServiceMessage request = new MockWebServiceMessage();
View Full Code Here

    }

    @Test
    public void testSingle() throws Exception {
        Resource resource = new ClassPathResource("single.xsd", getClass());
        SimpleXsdSchema schema = new SimpleXsdSchema(resource);
        schema.afterPropertiesSet();
        definition.setSchema(schema);

        definition.setTargetNamespace("http://www.springframework.org/spring-ws/single/definitions");
        definition.setPortTypeName("Order");
        definition.setLocationUri("http://localhost:8080/");
View Full Code Here

    }

    @Test
    public void testSoap11And12() throws Exception {
        Resource resource = new ClassPathResource("single.xsd", getClass());
        SimpleXsdSchema schema = new SimpleXsdSchema(resource);
        schema.afterPropertiesSet();
        definition.setSchema(schema);

        definition.setTargetNamespace("http://www.springframework.org/spring-ws/single/definitions");
        definition.setPortTypeName("Order");
        definition.setLocationUri("http://localhost:8080/");
View Full Code Here

    }

    @Test
    public void getLastModified() throws Exception {
        Resource single = new ClassPathResource("single.xsd", getClass());
        SimpleXsdSchema schema = new SimpleXsdSchema(single);
        schema.afterPropertiesSet();
        long lastModified = single.getFile().lastModified();
        assertEquals("Invalid last modified", lastModified, adapter.getLastModified(null, schema));
    }
View Full Code Here

        definition.setTargetNamespace(definitionNamespace);
        String schemaNamespace = "http://www.springframework.org/spring-ws/schema";
        definition.addNamespace("schema", schemaNamespace);

        Resource resource = new ClassPathResource("schema.xsd", getClass());
        SimpleXsdSchema schema = new SimpleXsdSchema(resource);
        schema.afterPropertiesSet();

        provider.setSchema(schema);

        provider.addTypes(definition);
View Full Code Here

    @Test
    public void handleGet() throws Exception {
        request.setMethod(HttpTransportConstants.METHOD_GET);
        Resource single = new ClassPathResource("single.xsd", getClass());
        SimpleXsdSchema schema = new SimpleXsdSchema(single);
        schema.afterPropertiesSet();
        adapter.handle(request, response, schema);
        String expected = new String(FileCopyUtils.copyToByteArray(single.getFile()));
        assertXMLEqual(expected, response.getContentAsString());
    }
View Full Code Here

        request.setServletPath("/service.xsd");
        request.setPathInfo(null);
        request.setRequestURI("/context/service.xsd");

        Resource importing = new ClassPathResource("importing-input.xsd", getClass());
        SimpleXsdSchema schema = new SimpleXsdSchema(importing);
        schema.afterPropertiesSet();

        adapter.handle(request, response, schema);

        InputStream inputStream = new ByteArrayInputStream(response.getContentAsByteArray());
        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
View Full Code Here

    return wsdl11Definition;
  }

  @Bean
  public XsdSchema countriesSchema() {
    return new SimpleXsdSchema(new ClassPathResource("META-INF/schemas/hr.xsd"));
  }
View Full Code Here

       
        DomXmlMessageValidator validator = new DomXmlMessageValidator();
       
        XsdSchemaRepository schemaRepository = new XsdSchemaRepository();
        Resource schemaResource = new ClassPathResource("com/consol/citrus/validation/test.xsd");
        SimpleXsdSchema schema = new SimpleXsdSchema(schemaResource);
        schema.afterPropertiesSet();
       
        schemaRepository.getSchemas().add(schema);
       
        validator.addSchemaRepository(schemaRepository);
       
View Full Code Here

TOP

Related Classes of org.springframework.xml.xsd.SimpleXsdSchema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.