Examples of XmlSchemaCollection


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

    private Map<XmlSchema, Set<XmlSchemaType>> xmlTypesCheckedForCrossImportsPerSchema
        = new HashMap<XmlSchema, Set<XmlSchemaType>>();


    public SchemaCollection() {
        this(new XmlSchemaCollection());
    }
View Full Code Here

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

        binding.setUndefined(false);
        definition.addBinding(binding);
        wsdlDefinition.setBinding(binding);

        // call each helper in turn to populate the wsdl.types element
        XmlSchemaCollection schemaCollection = new XmlSchemaCollection();

        for (Map.Entry<XMLTypeHelper, List<DataType>> en: getDataTypes(interfaze, false, helpers).entrySet()) {
            XMLTypeHelper helper = en.getKey();
            if (helper == null) {
                continue;
View Full Code Here

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

                                getSchemaAsString(schema)
                                , options));

            }

            XmlSchemaCollection extras = new XmlSchemaCollection();
            // add the third party schemas
            //todo perhaps checking the namespaces would be a good idea to
            //make the generated code work efficiently
            for (int i = 0; i < additionalSchemas.length; i++) {
                completeSchemaList.add(extras.read(additionalSchemas[i]));
                topLevelSchemaList.add(XmlObject.Factory.parse(
                        additionalSchemas[i]
                        , null));
            }
View Full Code Here

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

            }
           
            OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream, UTF8);
            writer = new BufferedWriter(outputStreamWriter);
           
            XmlSchemaCollection collection = serviceInfo.getXmlSchemaCollection().getXmlSchemaCollection();
            SchemaJavascriptBuilder jsBuilder =
                new SchemaJavascriptBuilder(serviceInfo
                .getXmlSchemaCollection(), prefixManager, nameManager);
            String jsForSchemas = jsBuilder.generateCodeForSchemaCollection(collection);
            writer.append(jsForSchemas);
View Full Code Here

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

        assertEquals("name", c.getLocalName());
        assertEquals("nodet", c.getFirstChild().getNodeValue());
    }
   
    protected XmlSchemaElement getElement(String schemaStr, QName element) {
        XmlSchemaCollection col = new XmlSchemaCollection();
        XmlSchema schema = col.read(new StreamSource(new StringReader(schemaStr)), null);
        return schema.getElementByName(element);
    }
View Full Code Here

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

        wsdlInterface.setUnresolved(false);
        wsdlInterface.setRemotable(true);
        PortType portType = (PortType)def.getAllPortTypes().values().iterator().next();
        wsdlInterface.setPortType(portType);

        readInlineSchemas(wsdlFactory, wsdlDefinition, def, new XmlSchemaCollection());

        try {
            for (Operation op : iface.getOperations()) {
                javax.wsdl.Operation wsdlOp = portType.getOperation(op.getName(), null, null);
                WSDLOperationIntrospectorImpl opx =
View Full Code Here

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

    private Map<String, List<XSDefinition>> map = new HashMap<String, List<XSDefinition>>();
    private XmlSchemaCollection schemaCollection;

    public XSDModelResolver(Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
        this.contribution = contribution;
        this.schemaCollection = new XmlSchemaCollection();
        schemaCollection.setSchemaResolver(new URIResolverImpl(contribution));
        this.factory = new DefaultWSDLFactory();
    }
View Full Code Here

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

    /**
     * @see org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition#getXmlSchemaElement(javax.xml.namespace.QName)
     */
    public XmlSchemaElement getXmlSchemaElement(QName name) {
        XmlSchemaCollection schemaCollection = null;
        for (XSDefinition xsd : schemas) {
            if (schemaCollection == null && xsd.getSchemaCollection() != null) {
                schemaCollection = xsd.getSchemaCollection();
            }
            XmlSchema schema = xsd.getSchema();
            XmlSchemaElement element = getXmlSchemaObject(schema, name, XmlSchemaElement.class);
            if (element != null) {
                return element;
            }
        }
        if (schemaCollection != null) {
            return schemaCollection.getElementByQName(name);
        }
        return null;
    }
View Full Code Here

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

    /**
     * @see org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition#getXmlSchemaType(javax.xml.namespace.QName)
     */
    public XmlSchemaType getXmlSchemaType(QName name) {
        XmlSchemaCollection schemaCollection = null;
        for (XSDefinition xsd : schemas) {
            if (xsd.getSchemaCollection() != null) {
                schemaCollection = xsd.getSchemaCollection();
            }
            XmlSchema schema = xsd.getSchema();
            XmlSchemaType type = getXmlSchemaObject(schema, name, XmlSchemaType.class);
            if (type != null) {
                return type;
            }
        }
        if (schemaCollection != null) {
            return schemaCollection.getTypeByQName(name);
        }
        return null;
    }
View Full Code Here

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

        binding.setUndefined(false);
        definition.addBinding(binding);
        wsdlDefinition.setBinding(binding);

        // call each helper in turn to populate the wsdl.types element
        XmlSchemaCollection schemaCollection = new XmlSchemaCollection();

        for (Map.Entry<XMLTypeHelper, List<DataType>> en: getDataTypes(interfaze, false, helpers).entrySet()) {
            XMLTypeHelper helper = en.getKey();
            if (helper == null) {
                continue;
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.