Examples of XmlSchemaImport


Examples of org.apache.ws.commons.schema.XmlSchemaImport

        schemaCol.getKnownNamespaceMap().put("http://www.w3.org/XML/1998/namespace",
                new XmlSchemaCollection().read(new InputSource(Resources.asURI("xml.xsd"))));
        XmlSchema schema = schemaCol.read(new InputSource(Resources.asURI("knownNamespace.xsd")));
        List<XmlSchemaExternal> externals = schema.getExternals();
        assertEquals(1, externals.size());
        XmlSchemaImport schemaImport = (XmlSchemaImport)externals.get(0);
        assertEquals("http://www.w3.org/XML/1998/namespace", schemaImport.getNamespace());
        XmlSchema schema2 = schemaImport.getSchema();
        assertNotNull(schema2);
    }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaImport

                        while (includeIter.hasNext()) {
                            Object obj = includeIter.next();
                            if (!(obj instanceof XmlSchemaImport)) {
                                continue;
                            }
                            XmlSchemaImport xmlImport = (XmlSchemaImport) obj;
                            if (xmlImport.getNamespace().equals(
                                    part.getTypeName().getNamespaceURI())) {
                                XmlSchema importSchema = xmlImport.getSchema();
                                schemaType = importSchema.getTypeByName(part
                                        .getTypeName());
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaImport

    }
   
    public void visit(AST node) {
        if (!declaredWSAImport) {
            // We need to add an import statement to include the WS addressing types
            XmlSchemaImport wsaImport = new XmlSchemaImport();
            wsaImport.setNamespace(ReferenceConstants.WSADDRESSING_NAMESPACE);
            wsaImport.setSchemaLocation(ReferenceConstants.WSADDRESSING_LOCATION);
            schema.getItems().add(wsaImport);
           
            // Add the addressing namespace to the WSDLs list of namespaces.
            wsdlDefinition.addNamespace(ReferenceConstants.WSADDRESSING_PREFIX,
                                        ReferenceConstants.WSADDRESSING_NAMESPACE);
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaImport

    private void addImport(XmlSchema schema, String ns) {
        if (!ns.equals(schema.getTargetNamespace())
            && !ns.equals(WSDLConstants.NS_SCHEMA_XSD)
            && !isExistImport(schema, ns)) {
            XmlSchemaImport is = new XmlSchemaImport();
            is.setNamespace(ns);
            if (this.schemaLocationMapping.get(ns) != null) {
                is.setSchemaLocation(this.schemaLocationMapping.get(ns));
            }
            schema.getItems().add(is);
        }
    }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaImport

        boolean isExist = false;

        for (Iterator ite = schema.getItems().getIterator(); ite.hasNext();) {
            XmlSchemaObject obj = (XmlSchemaObject)ite.next();
            if (obj instanceof XmlSchemaImport) {
                XmlSchemaImport xsImport = (XmlSchemaImport)obj;
                if (xsImport.getNamespace().equals(ns)) {
                    isExist = true;
                    break;
                }
            }
        }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaImport

    private void addImport(XmlSchema schema, String ns) {
        if (!ns.equals(schema.getTargetNamespace())
            && !ns.equals(WSDLConstants.NS_SCHEMA_XSD)
            && !isExistImport(schema, ns)) {
            XmlSchemaImport is = new XmlSchemaImport();
            is.setNamespace(ns);
            if (this.schemaLocationMapping.get(ns) != null) {
                is.setSchemaLocation(this.schemaLocationMapping.get(ns));
            }
            schema.getItems().add(is);
        }
    }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaImport

        boolean isExist = false;

        for (Iterator ite = schema.getItems().getIterator(); ite.hasNext();) {
            XmlSchemaObject obj = (XmlSchemaObject)ite.next();
            if (obj instanceof XmlSchemaImport) {
                XmlSchemaImport xsImport = (XmlSchemaImport)obj;
                if (xsImport.getNamespace().equals(ns)) {
                    isExist = true;
                    break;
                }
            }
        }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaImport

    private void addImport(XmlSchema schema, String ns) {
        if (!ns.equals(schema.getTargetNamespace())
            && !ns.equals(WSDLConstants.NS_SCHEMA_XSD)
            && !isExistImport(schema, ns)) {
            XmlSchemaImport is = new XmlSchemaImport();
            is.setNamespace(ns);
            if (this.schemaLocationMapping.get(ns) != null) {
                is.setSchemaLocation(this.schemaLocationMapping.get(ns));
            }
            schema.getItems().add(is);
        }
    }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaImport

        boolean isExist = false;

        for (Iterator ite = schema.getItems().getIterator(); ite.hasNext();) {
            XmlSchemaObject obj = (XmlSchemaObject)ite.next();
            if (obj instanceof XmlSchemaImport) {
                XmlSchemaImport xsImport = (XmlSchemaImport)obj;
                if (xsImport.getNamespace().equals(ns)) {
                    isExist = true;
                    break;
                }
            }
        }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchemaImport

    private void addImport(XmlSchema schema, String ns) {
        if (!ns.equals(schema.getTargetNamespace())
            && !ns.equals(WSDLConstants.NS_SCHEMA_XSD)
            && !isExistImport(schema, ns)) {
            XmlSchemaImport is = new XmlSchemaImport();
            is.setNamespace(ns);
            if (this.schemaLocationMapping.get(ns) != null) {
                is.setSchemaLocation(this.schemaLocationMapping.get(ns));
            }
            schema.getItems().add(is);
        }
    }
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.