Package org.apache.cxf.catalog

Examples of org.apache.cxf.catalog.OASISCatalogManager


                }
                ids.add(key);
            }
        }
        Bus bus = context.get(Bus.class);
        OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class);
        for (XmlSchema schema : schemaCollection.getXmlSchemas()) {
            if (XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(schema.getTargetNamespace())) {
                continue;
            }
            String key = schema.getSourceURI();
View Full Code Here


            .createProxyWrapper(listener,
                                JAXBUtils.getParamClass(compiler, "setErrorListener"));
       
        compiler.setErrorListener(elForRun);
       
        OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class);
        hackInNewInternalizationLogic(compiler, catalog);

        addSchemas(compiler.getOptions(), compiler, svc.getServiceInfos(), schemas);
        addBindingFiles(bindingFiles, compiler);
        S2JJAXBModel intermediateModel = compiler.bind();
View Full Code Here

                            List<ServiceInfo> serviceList,
                            SchemaCollection schemaCollection) {

        Map<String, Element> done = new HashMap<String, Element>();
        Map<String, Element> notDone = new HashMap<String, Element>();
        OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class);
        for (XmlSchema schema : schemaCollection.getXmlSchemas()) {
            if (XMLConstants.W3C_XML_SCHEMA_NS_URI.equals(schema.getTargetNamespace())) {
                continue;
            }
            String key = schema.getSourceURI();
View Full Code Here

        return info;
    }
   
    private String resolveLocationWithCatalog(String href) {
        if (bus != null) {
            OASISCatalogManager catalogResolver = OASISCatalogManager.getCatalogManager(bus);
            try {
                return new OASISCatalogManagerHelper().resolve(catalogResolver,
                                                               href, null);
            } catch (Exception e) {
                throw new RuntimeException("Catalog resolution failed", e);
View Full Code Here

    private String resolveByCatalog(String url) {
        if (StringUtils.isEmpty(url)) {
            return null;
        }
        Bus bus = env.get(Bus.class);
        OASISCatalogManager catalogResolver = OASISCatalogManager.getCatalogManager(bus);
       
        try {
            return new OASISCatalogManagerHelper().resolve(catalogResolver,
                                                           url, null);
        } catch (Exception e1) {
View Full Code Here

                               new InputStreamReader(url.openStream(), "UTF-8"));
                StreamSource source = new StreamSource(r);
                source.setSystemId(url.toString());
                sources.add(source);
            }
            final OASISCatalogManager catalogResolver = OASISCatalogManager.getCatalogManager(bus);
            if (catalogResolver != null) {
                catalogLocation = catalogLocation == null
                    ? SchemaHandler.DEFAULT_CATALOG_LOCATION : catalogLocation;
                URL catalogURL = ResourceUtils.getResourceURL(catalogLocation, bus);
                if (catalogURL != null) {
                    try {
                        catalogResolver.loadCatalog(catalogURL);
                        factory.setResourceResolver(new LSResourceResolver() {
   
                            public LSInput resolveResource(String type, String namespaceURI, String publicId,
                                                           String systemId, String baseURI) {
                                try {
                                    String resolvedLocation  = catalogResolver.resolveSystem(systemId);
                                   
                                    if (resolvedLocation == null) {
                                        resolvedLocation = catalogResolver.resolveURI(namespaceURI);
                                    }
                                    if (resolvedLocation == null) {
                                        resolvedLocation = catalogResolver.resolvePublic(publicId, systemId);
                                    }
                                    if (resolvedLocation != null) {
                                        InputStream resourceStream =
                                            ResourceUtils.getResourceStream(resolvedLocation, bus);
                                        if (resourceStream != null) {
View Full Code Here

    private String resolveByCatalog(String url) {
        if (StringUtils.isEmpty(url)) {
            return null;
        }
        Bus bus = (Bus)env.get(Bus.class);
        OASISCatalogManager catalogResolver = OASISCatalogManager.getCatalogManager(bus);
        if (catalogResolver == null) {
            return null;
        }
        String resolvedLocation;
        try {
            resolvedLocation = catalogResolver.resolveSystem(url);
            if (resolvedLocation == null) {
                resolvedLocation = catalogResolver.resolveURI(url);
            }
        } catch (Exception e1) {
            Message msg = new Message("FAILED_RESOLVE_CATALOG", LOG, url);
            throw new ToolException(msg, e1);
        }
View Full Code Here

       
    private CXFCatalogUtils() {       
    }
       
    public static void loadOASISCatalog(Bus bus, URL catalogURL) {
        OASISCatalogManager catalog = new OASISCatalogManager();
        try {
            catalog.loadCatalog(catalogURL);
            LOG.debug("Loaded " + catalogURL + " catalog.");
            bus.setExtension(catalog, OASISCatalogManager.class);
        } catch (IOException e) {
            LOG.warn("Failed to load catalog file: " + catalogURL, e);
        }       
View Full Code Here

        return info;
    }
   
    private String resolveLocationWithCatalog(String href) {
        if (bus != null) {
            OASISCatalogManager catalogResolver = OASISCatalogManager.getCatalogManager(bus);
            try {
                return new OASISCatalogManagerHelper().resolve(catalogResolver,
                                                               href, null);
            } catch (Exception e) {
                throw new RuntimeException("Catalog resolution failed", e);
View Full Code Here

    }
   
    protected void updateDefinition(Definition def, Map<String, Definition> done,
                                  Map<String, SchemaReference> doneSchemas,
                                  String base, EndpointInfo ei) {
        OASISCatalogManager catalogs = OASISCatalogManager.getCatalogManager(bus);   
       
        Collection<List> imports = CastUtils.cast((Collection<?>)def.getImports().values());
        for (List lst : imports) {
            List<Import> impLst = CastUtils.cast(lst);
            for (Import imp : impLst) {
View Full Code Here

TOP

Related Classes of org.apache.cxf.catalog.OASISCatalogManager

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.