Package com.ibm.wsdl.extensions.schema

Examples of com.ibm.wsdl.extensions.schema.SchemaImpl


        // Import schemas in definition
        if (_schemas.getSize() > 0) {
           Types types = flat.createTypes();
           for (Iterator it = _schemas.getSchemas().iterator(); it.hasNext();) {
              javax.wsdl.extensions.schema.Schema imp = new SchemaImpl();
              imp.setElement(((Schema)it.next()).getRoot());
              imp.setElementType(new QName("http://www.w3.org/2001/XMLSchema", "schema"));
              types.addExtensibilityElement(imp);
           }
           flat.setTypes(types);
        }
View Full Code Here


       
        // Import schemas in definition
        if (schemas.getSize() > 0) {
           Types types = flat.createTypes();
           for (Iterator it = schemas.getSchemas().iterator(); it.hasNext();) {
              javax.wsdl.extensions.schema.Schema imp = new SchemaImpl();
              imp.setElement(((Schema)it.next()).getRoot());
              imp.setElementType(new QName("http://www.w3.org/2001/XMLSchema", "schema"));
              types.addExtensibilityElement(imp);
           }
           flat.setTypes(types);
        }
       
View Full Code Here

        doc.appendChild(nd);
       
        for (SchemaInfo schemaInfo : schemas) {
           
            if (!useSchemaImports) {
                SchemaImpl schemaImpl = new SchemaImpl();
                schemaImpl.setRequired(true);
                schemaImpl.setElementType(WSDLConstants.SCHEMA_QNAME);
                schemaImpl.setElement(schemaInfo.getElement());
                types.addExtensibilityElement(schemaImpl);
            } else {
                //imports
                String name = baseFileName + "_schema" + (++xsdCount) + ".xsd";
                Element imp = XMLUtils.createElementNS(doc,
                                                       new QName(WSDLConstants.NU_SCHEMA_XSD,
                                                                  "import"));
                imp.setAttribute("schemaLocation", name);
                imp.setAttribute("namespace", schemaInfo.getNamespaceURI());
                nd.appendChild(imp);
                              
                imports.put(name, schemaInfo);
            }
            // add imports for those schemata which are inlined.
            addRequiredSchemaImports(schemaInfo);
        }
        if (useSchemaImports) {
            SchemaImpl schemaImpl = new SchemaImpl();
            schemaImpl.setRequired(true);
            schemaImpl.setElementType(WSDLConstants.SCHEMA_QNAME);
            schemaImpl.setElement(nd);
            types.addExtensibilityElement(schemaImpl);
        }
        def.setTypes(types);
    }
View Full Code Here

            while ((entry = zipInputStream.getNextEntry()) != null) {
                entryName = entry.getName();
                if (entryName.startsWith(XMLBeansExtension.SCHEMA_FOLDER) && entryName.endsWith(".xsd")) {
                    InputStream schemaEntry = axisService.getClassLoader().getResourceAsStream(entryName);
                    schema = new SchemaImpl();
                    Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(schemaEntry);
                    schema.setElement(document.getDocumentElement());
                    types.addExtensibilityElement(schema);
                }
            }
View Full Code Here

    }

    protected void buildTypes(TypeInfo typeInfo) {
        Types types = definition.createTypes();
        for (SchemaInfo schemaInfo : typeInfo.getSchemas()) {
            SchemaImpl schemaImpl = new SchemaImpl();
            schemaImpl.setRequired(true);
            schemaImpl.setElementType(SCHEMA_QNAME);
            schemaImpl.setElement(schemaInfo.getElement());
            types.addExtensibilityElement(schemaImpl);
        }
       
        definition.setTypes(types);
    }
View Full Code Here

        doc.appendChild(nd);
       
        for (SchemaInfo schemaInfo : schemas) {
           
            if (!useSchemaImports) {
                SchemaImpl schemaImpl = new SchemaImpl();
                schemaImpl.setRequired(true);
                schemaImpl.setElementType(WSDLConstants.QNAME_SCHEMA);
                schemaImpl.setElement(schemaInfo.getElement());
                types.addExtensibilityElement(schemaImpl);
            } else {
                //imports
                String name = baseFileName + "_schema" + (++xsdCount) + ".xsd";
                Element imp = XMLUtils.createElementNS(doc,
                                                       new QName(WSDLConstants.NS_SCHEMA_XSD,
                                                                  "import"));
                imp.setAttribute("schemaLocation", name);
                imp.setAttribute("namespace", schemaInfo.getNamespaceURI());
                nd.appendChild(imp);
                              
                imports.put(name, schemaInfo);
            }
            // add imports for those schemata which are inlined.
            addRequiredSchemaImports(schemaInfo);
        }
        if (useSchemaImports) {
            SchemaImpl schemaImpl = new SchemaImpl();
            schemaImpl.setRequired(true);
            schemaImpl.setElementType(WSDLConstants.QNAME_SCHEMA);
            schemaImpl.setElement(nd);
            types.addExtensibilityElement(schemaImpl);
        }
        def.setTypes(types);
    }
View Full Code Here

        doc.appendChild(nd);
       
        for (SchemaInfo schemaInfo : schemas) {
           
            if (!useSchemaImports) {
                SchemaImpl schemaImpl = new SchemaImpl();
                schemaImpl.setRequired(true);
                schemaImpl.setElementType(WSDLConstants.QNAME_SCHEMA);
                schemaImpl.setElement(schemaInfo.getElement());
                types.addExtensibilityElement(schemaImpl);
            } else {
                //imports
                String name = baseFileName + "_schema" + (++xsdCount) + ".xsd";
                Element imp = XMLUtils.createElementNS(doc,
                                                       new QName(WSDLConstants.NS_SCHEMA_XSD,
                                                                  "import"));
                imp.setAttribute("schemaLocation", name);
                imp.setAttribute("namespace", schemaInfo.getNamespaceURI());
                nd.appendChild(imp);
                              
                imports.put(name, schemaInfo);
            }
            // add imports for those schemata which are inlined.
            addRequiredSchemaImports(schemaInfo);
        }
        if (useSchemaImports) {
            SchemaImpl schemaImpl = new SchemaImpl();
            schemaImpl.setRequired(true);
            schemaImpl.setElementType(WSDLConstants.QNAME_SCHEMA);
            schemaImpl.setElement(nd);
            types.addExtensibilityElement(schemaImpl);
        }
        def.setTypes(types);
    }
View Full Code Here

        doc.appendChild(nd);
       
        for (SchemaInfo schemaInfo : schemas) {
           
            if (!useSchemaImports) {
                SchemaImpl schemaImpl = new SchemaImpl();
                schemaImpl.setRequired(true);
                schemaImpl.setElementType(WSDLConstants.SCHEMA_QNAME);
                schemaImpl.setElement(schemaInfo.getElement());
                types.addExtensibilityElement(schemaImpl);
            } else {
                //imports
                String name = baseFileName + "_schema" + (++xsdCount) + ".xsd";
                Element imp = XMLUtils.createElementNS(doc,
                                                       new QName(WSDLConstants.NU_SCHEMA_XSD,
                                                                  "import"));
                imp.setAttribute("schemaLocation", name);
                imp.setAttribute("namespace", schemaInfo.getNamespaceURI());
                nd.appendChild(imp);
                              
                imports.put(name, schemaInfo);
            }
            // add imports for those schemata which are inlined.
            addRequiredSchemaImports(schemaInfo);
        }
        if (useSchemaImports) {
            SchemaImpl schemaImpl = new SchemaImpl();
            schemaImpl.setRequired(true);
            schemaImpl.setElementType(WSDLConstants.SCHEMA_QNAME);
            schemaImpl.setElement(nd);
            types.addExtensibilityElement(schemaImpl);
        }
        def.setTypes(types);
    }
View Full Code Here

                }
                schemaInfo.setElement(e);
            }
           
            if (!useSchemaImports) {
                SchemaImpl schemaImpl = new SchemaImpl();
                schemaImpl.setRequired(true);
                schemaImpl.setElementType(WSDLConstants.SCHEMA_QNAME);
                schemaImpl.setElement(schemaInfo.getElement());
                types.addExtensibilityElement(schemaImpl);
            } else {
                //imports
                String name = baseFileName + "_schema" + (++xsdCount) + ".xsd";
                Element imp = XMLUtils.createElementNS(doc,
                                                       new QName("http://www.w3.org/2001/XMLSchema",
                                                                  "import"));
                imp.setAttribute("schemaLocation", name);
                imp.setAttribute("namespace", schemaInfo.getNamespaceURI());
                nd.appendChild(imp);
                              
                imports.put(name, schemaInfo);
            }
        }
        if (useSchemaImports) {
            SchemaImpl schemaImpl = new SchemaImpl();
            schemaImpl.setRequired(true);
            schemaImpl.setElementType(WSDLConstants.SCHEMA_QNAME);
            schemaImpl.setElement(nd);
            types.addExtensibilityElement(schemaImpl);
        }
        def.setTypes(types);
    }
View Full Code Here

                    if (child.getChildren().size() > 0)
                    {
                        Document inputDoc = new Document(child);
                        org.w3c.dom.Document doc = new DOMOutputter().output(inputDoc);
                       
                        Schema uee = new SchemaImpl();
                        uee.setElement((org.w3c.dom.Element) doc.getDocumentElement());
                        uee.setRequired(Boolean.TRUE);
                        uee.setElementType(SCHEMA_QNAME);
                        types.addExtensibilityElement(uee);
                    }
                }
            }
            catch (JDOMException e)
View Full Code Here

TOP

Related Classes of com.ibm.wsdl.extensions.schema.SchemaImpl

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.