Package org.apache.ws.commons.schema

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


   * @throws IOException
   * @throws WSDLException
   */
  protected void processWsdl(URL wsdl) throws IOException, WSDLException {
    // xmlSchema reader
    XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection();
    xmlSchemaCollection.setBaseUri(wsdl.toString());
    // wsdl
    WSDLFactory wsdlFactory = WSDLFactory.newInstance();
    WSDLReader reader = wsdlFactory.newWSDLReader();
    Definition definition = reader.readWSDL(wsdl.toString());
    // extract
View Full Code Here

   *
   * @param xsd
   * @throws IOException
   */
  protected void processXsd(URL xsd) throws IOException {
    XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection();
    xmlSchemaCollection.setBaseUri(xsd.toString());
    XmlSchema schema = xmlSchemaCollection.read(new InputStreamReader(xsd.openStream()), null);
    processSchema(schema);
  }
View Full Code Here

    /**
     * @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();
            }
            XmlSchemaElement element = xsd.getXmlSchemaElement(name);
            if (element != null) {
                return element;
            }
        }
        if (schemaCollection != null) {
            return schemaCollection.getElementByQName(name);
        }
        return null;
    }
View Full Code Here

    /**
     * @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();
            }
            XmlSchemaType type = xsd.getXmlSchemaType(name);
            if (type != null) {
                return type;
            }
        }
        if (schemaCollection != null) {
            return schemaCollection.getTypeByQName(name);
        }
        return null;
    }
View Full Code Here

    public TypesVisitor(WSDLASTVisitor visitor)
        throws WSDLException {
        wsdlASTVisitor = visitor;
        definition = visitor.getDefinition();
        schemas = new XmlSchemaCollection();
        schema = new XmlSchema(definition.getTargetNamespace(), schemas);      
        createCorbaTypeMap();
    }
View Full Code Here

        public WSDL11ToAxisPatchedBuilder(InputStream in) {
            super(in);
        }

        protected XmlSchema getXMLSchema(Element element, String baseUri) {
            XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
            if (baseUri != null) {
                schemaCollection.setBaseUri(baseUri);
            }
            return schemaCollection.read(element, baseUri);
        }
View Full Code Here

        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

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

    public XSDModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
        this.contribution = contribution;
        this.schemaCollection = new XmlSchemaCollection();
        this.factory = new DefaultXSDFactory();
    }
View Full Code Here

        Types types = newDef.getTypes();
        assertNotNull(types);
        Collection<ExtensibilityElement> schemas =
            CastUtils.cast(types.getExtensibilityElements(), ExtensibilityElement.class);
        assertEquals(1, schemas.size());
        XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
        Element schemaElem = ((Schema)schemas.iterator().next()).getElement();
        assertEquals("http://apache.org/hello_world_soap_http/types",
                     schemaCollection.read(schemaElem).getTargetNamespace()
                     );
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.commons.schema.XmlSchemaCollection

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.