Examples of ResourceSource


Examples of org.springframework.xml.transform.ResourceSource

     * @return the request matcher
     * @since 2.1.1
     */
    public static RequestMatcher soapEnvelope(Resource soapEnvelope) throws IOException {
        Assert.notNull(soapEnvelope, "'soapEnvelope' must not be null");
        return soapEnvelope(new ResourceSource(soapEnvelope));
    }
View Full Code Here

Examples of org.springframework.xml.transform.ResourceSource

     * @param payload the response payload
     * @return the response callback
     */
    public static ResponseCreator withPayload(Resource payload) throws IOException {
        Assert.notNull(payload, "'payload' must not be null");
        return withPayload(new ResourceSource(payload));
    }
View Full Code Here

Examples of org.springframework.xml.transform.ResourceSource

     * @return the response callback
     * @since 2.1.1
     */
    public static ResponseCreator withSoapEnvelope(Resource soapEnvelope) throws IOException {
        Assert.notNull(soapEnvelope, "'soapEnvelope' must not be null");
        return withSoapEnvelope(new ResourceSource(soapEnvelope));
    }
View Full Code Here

Examples of org.springframework.xml.transform.ResourceSource

     *
     * @param payload the XML payload
     * @return the response matcher
     */
    public static ResponseMatcher payload(Resource payload) throws IOException {
        return payload(new ResourceSource(payload));
    }
View Full Code Here

Examples of org.springframework.xml.transform.ResourceSource

     * @param soapEnvelope the XML SOAP envelope
     * @return the response matcher
     * @since 2.1.1
     */
    public static ResponseMatcher soapEnvelope(Resource soapEnvelope) throws IOException {
        return soapEnvelope(new ResourceSource(soapEnvelope));
    }
View Full Code Here

Examples of org.springframework.xml.transform.ResourceSource

     * @param payload the request payload
     * @return the request creator
     */
    public static RequestCreator withPayload(Resource payload) throws IOException {
        Assert.notNull(payload, "'payload' must not be null");
        return withPayload(new ResourceSource(payload));
    }
View Full Code Here

Examples of org.springframework.xml.transform.ResourceSource

     * @return the request creator
     * @since 2.1.1
     */
    public static RequestCreator withSoapEnvelope(Resource soapEnvelope) throws IOException {
        Assert.notNull(soapEnvelope, "'soapEnvelope' must not be null");
        return withSoapEnvelope(new ResourceSource(soapEnvelope));
    }
View Full Code Here

Examples of org.springframework.xml.transform.ResourceSource

        Resource[] schemaResources = new Resource[]{
                new ClassPathResource("multipleSchemas1.xsd", AbstractValidatorFactoryTestCase.class),
                new ClassPathResource("multipleSchemas2.xsd", AbstractValidatorFactoryTestCase.class)};
        validator = createValidator(schemaResources, XmlValidatorFactory.SCHEMA_W3C_XML);

        Source document = new ResourceSource(
                new ClassPathResource("multipleSchemas1.xml", AbstractValidatorFactoryTestCase.class));
        SAXParseException[] errors = validator.validate(document);
        Assert.assertEquals("ValidationErrors returned", 0, errors.length);
        validator = createValidator(schemaResources, XmlValidatorFactory.SCHEMA_W3C_XML);
        document = new ResourceSource(
                new ClassPathResource("multipleSchemas2.xml", AbstractValidatorFactoryTestCase.class));
        errors = validator.validate(document);
        Assert.assertEquals("ValidationErrors returned", 0, errors.length);
    }
View Full Code Here

Examples of org.springframework.xml.transform.ResourceSource

    @Override
    public Source getSource() {
        try {
            XMLReader xmlReader = XMLReaderFactory.createXMLReader();
            xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
            return new ResourceSource(xmlReader, wsdlResource);
        }
        catch (SAXException ex) {
            throw new WsdlDefinitionException("Could not create XMLReader", ex);
        }
        catch (IOException ex) {
View Full Code Here

Examples of org.springframework.xml.transform.ResourceSource

    @Override
    protected URI lookupDestination() {
        try {
            DOMResult result = new DOMResult();
            Transformer transformer = transformerFactory.newTransformer();
            transformer.transform(new ResourceSource(wsdlResource), result);
            Document definitionDocument = (Document) result.getNode();
            String location = locationXPathExpression.evaluateAsString(definitionDocument);
            if (logger.isDebugEnabled()) {
                logger.debug("Found location [" + location + "] in " + wsdlResource);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.