Package org.apache.cxf.resource

Examples of org.apache.cxf.resource.ExtendedURIResolver


        String xsd = "http://www.w3.org/2005/08/addressing/ws-addr.xsd";
        String resolvedSchemaLocation = catalogManager.resolveSystem(xsd);
        assertEquals("classpath:/schemas/wsdl/ws-addr.xsd", resolvedSchemaLocation);

        ExtendedURIResolver resolver = new ExtendedURIResolver();
        InputSource in = resolver.resolve(resolvedSchemaLocation, null);
        assertTrue(in.getSystemId().indexOf("api") != -1);
        assertTrue(in.getSystemId().indexOf("/schemas/wsdl/ws-addr.xsd") != -1);
    }
View Full Code Here


    }

    public Policy resolveReference(String uri) {
        int pos = uri.indexOf('#');
        String documentURI = pos == -1 ? uri : uri.substring(0, pos);
        ExtendedURIResolver resolver = new ExtendedURIResolver();
        InputSource is = resolver.resolve(documentURI, baseURI);
        if (null == is) {
            return null;
        }
        Document doc = null;
        try {
            doc = DOMUtils.readXml(is.getByteStream());
        } catch (Exception ex) {
            throw new PolicyException(ex);
        } finally {
            resolver.close();
        }
        if (pos == -1) {
            return builder.getPolicy(doc.getDocumentElement());
        } else {
            String id = uri.substring(pos + 1);
View Full Code Here

            return loadLocalPolicy(uri);
        }
    }
       
    private Element loadRemotePolicy(String uri, String defName) {
        ExtendedURIResolver resolver = new ExtendedURIResolver();
        InputSource src = resolver.resolve(uri, "classpath:");
       
        if (null == src) {
            return null;
        }
        XMLStreamReader reader = null;
View Full Code Here

    }
    private Element addPolicy(ServiceInfo service, Policy p, Class<?> cls, String defName) {
        String uri = p.uri();
        String ns = PolicyConstants.NAMESPACE_WS_POLICY;
        if (p.includeInWSDL()) {
            ExtendedURIResolver resolver = new ExtendedURIResolver();
            InputSource src = resolver.resolve(uri, "classpath:");
            if (src != null) {
                try {
                    Document doc = StaxUtils.read(StaxUtils.createXMLStreamReader(src));
                    if (service.getDescription() == null) {
                        service.setDescription(new DescriptionInfo());
View Full Code Here

    }
    private Element addPolicy(ServiceInfo service, Policy p, Class<?> cls, String defName) {
        String uri = p.uri();
        String ns = PolicyConstants.NAMESPACE_WS_POLICY;
        if (p.includeInWSDL()) {
            ExtendedURIResolver resolver = new ExtendedURIResolver();
            InputSource src = resolver.resolve(uri, "classpath:");
            if (src != null) {
                try {
                    Document doc = StaxUtils.read(StaxUtils.createXMLStreamReader(src));
                    if (service.getDescription() == null && cls != null) {
                        service.setDescription(new DescriptionInfo());
View Full Code Here

    }
    private Element addPolicy(ServiceInfo service, Policy p, Class<?> cls, String defName) {
        String uri = p.uri();
        String ns = Constants.URI_POLICY_NS;
        if (p.includeInWSDL()) {
            ExtendedURIResolver resolver = new ExtendedURIResolver();
            InputSource src = resolver.resolve(uri, "classpath:");
            if (src != null) {
                try {
                    Document doc = StaxUtils.read(StaxUtils.createXMLStreamReader(src));
                    if (service.getDescription() == null && cls != null) {
                        service.setDescription(new DescriptionInfo());
View Full Code Here

    private ExtendedURIResolver resolver;
    private Catalog catalogResolver;
   
    public CatalogXmlSchemaURIResolver(Catalog catalogResolver) {
        this.resolver = new ExtendedURIResolver();
        this.catalogResolver = catalogResolver;
    }
View Full Code Here

   
    public CatalogWSDLLocator(String wsdlUrl, Catalog catalogResolver) {
        this.wsdlUrl = wsdlUrl;
        this.baseUri = this.wsdlUrl;
        this.catalogResolver = catalogResolver;
        this.resolver = new ExtendedURIResolver();
    }
View Full Code Here

    public Policy resolveReference(String uri) {
        int pos = uri.indexOf('#');
        String documentURI = uri.substring(0, pos);
       
        InputSource is = new ExtendedURIResolver().resolve(documentURI, baseURI);
        if (null == is) {
            return null;
        }
        Document doc = null;
        try {
View Full Code Here

    public CatalogXmlSchemaURIResolver(Bus bus) {
        this(OASISCatalogManager.getCatalogManager(bus));
    }
    public CatalogXmlSchemaURIResolver(OASISCatalogManager catalogManager) {
        this.resolver = new ExtendedURIResolver();
        this.catalogResolver = catalogManager.getCatalog();
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.resource.ExtendedURIResolver

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.