Package org.apache.xml.security.utils.resolver

Examples of org.apache.xml.security.utils.resolver.ResourceResolverContext


        ResolverDirectHTTP resolverDirectHTTP = new ResolverDirectHTTP();
        resolverDirectHTTP.engineSetProperty("http.proxy.host",proxyHost);
        resolverDirectHTTP.engineSetProperty("http.proxy.port", proxyPort);
        resolverDirectHTTP.engineSetProperty("http.proxy.username", proxyUsername);
        resolverDirectHTTP.engineSetProperty("http.proxy.password", proxyPassword);
        ResourceResolverContext context =
            new ResourceResolverContext(uri, url, true);
        resolverDirectHTTP.engineResolveURI(context);
    }
View Full Code Here


        ResolverDirectHTTP resolverDirectHTTP = new ResolverDirectHTTP();
        resolverDirectHTTP.engineSetProperty("http.proxy.host",proxyHost);
        resolverDirectHTTP.engineSetProperty("http.proxy.port", proxyPort);
        resolverDirectHTTP.engineSetProperty("http.proxy.username", proxyUsername);
        resolverDirectHTTP.engineSetProperty("http.proxy.password", "wrongPassword");
        ResourceResolverContext context =
            new ResourceResolverContext(uri, url, true);
        try {
            resolverDirectHTTP.engineResolveURI(context);
            Assert.fail("Expected ResourceResolverException");
        } catch (ResourceResolverException e) {
            Assert.assertEquals("Server returned HTTP response code: 407 for URL: " + url, e.getMessage());
View Full Code Here

        uri.setNodeValue(url);

        ResolverDirectHTTP resolverDirectHTTP = new ResolverDirectHTTP();
        resolverDirectHTTP.engineSetProperty("http.basic.username", serverUsername);
        resolverDirectHTTP.engineSetProperty("http.basic.password", serverPassword);
        ResourceResolverContext context =
            new ResourceResolverContext(uri, url, true);
        resolverDirectHTTP.engineResolveURI(context);
    }
View Full Code Here

        uri.setNodeValue(url);

        ResolverDirectHTTP resolverDirectHTTP = new ResolverDirectHTTP();
        resolverDirectHTTP.engineSetProperty("http.basic.username", serverUsername);
        resolverDirectHTTP.engineSetProperty("http.basic.password", "wrongPassword");
        ResourceResolverContext context =
            new ResourceResolverContext(uri, url, true);
        try {
            resolverDirectHTTP.engineResolveURI(context);
            Assert.fail("Expected ResourceResolverException");
        } catch (ResourceResolverException e) {
            Assert.assertEquals("Server returned HTTP response code: 401 for URL: " + url, e.getMessage());
View Full Code Here

        resolverDirectHTTP.engineSetProperty("http.proxy.port", proxyPort);
        resolverDirectHTTP.engineSetProperty("http.proxy.username", proxyUsername);
        resolverDirectHTTP.engineSetProperty("http.proxy.password", proxyPassword);
        resolverDirectHTTP.engineSetProperty("http.basic.username", serverUsername);
        resolverDirectHTTP.engineSetProperty("http.basic.password", serverPassword);
        ResourceResolverContext context =
            new ResourceResolverContext(uri, url, true);
        resolverDirectHTTP.engineResolveURI(context);
    }
View Full Code Here

TOP

Related Classes of org.apache.xml.security.utils.resolver.ResourceResolverContext

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.