Package org.apache.cxf.catalog

Examples of org.apache.cxf.catalog.OASISCatalogManager


        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;
        }
        OASISCatalogManager catalogResolver = OASISCatalogManager.getCatalogManager(bus);
       
        try {
            return new OASISCatalogManagerHelper().resolve(catalogResolver,
                                                           url, null);
        } catch (Exception e1) {
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);
       
        try {
            return new OASISCatalogManagerHelper().resolve(catalogResolver,
                                                           url, null);
        } catch (Exception e1) {
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

   
    protected void updateDefinition(Bus bus,
                                    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

   
    protected void updateSchemaImports(Bus bus,
                                       Schema schema,
                                       Map<String, SchemaReference> doneSchemas,
                                       String base) {
        OASISCatalogManager catalogs = OASISCatalogManager.getCatalogManager(bus);   
        Collection<List<?>>  imports = CastUtils.cast((Collection<?>)schema.getImports().values());
        for (List<?> lst : imports) {
            List<SchemaImport> impLst = CastUtils.cast(lst);
            for (SchemaImport imp : impLst) {
                String start = imp.getSchemaLocationURI();
View Full Code Here

    public void initialize(ToolContext c) throws ToolException {
        this.context = c;

        SchemaCompiler schemaCompiler = XJC.createSchemaCompiler();
        Bus bus = context.get(Bus.class);
        OASISCatalogManager catalog = bus.getExtension(OASISCatalogManager.class);
        hackInNewInternalizationLogic(schemaCompiler, catalog);

        ClassCollector classCollector = context.get(ClassCollector.class);

        ClassNameAllocatorImpl allocator
View Full Code Here

                }
                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

import org.junit.Test;

public class CatalogTest extends Assert {
    @Test
    public void testCatalog() throws Exception {
        OASISCatalogManager catalogManager = new OASISCatalogManager();

        URL jaxwscatalog = getClass().getResource("/META-INF/jax-ws-catalog.xml");
        assertNotNull(jaxwscatalog);

        catalogManager.loadCatalog(jaxwscatalog);

        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);
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.