Package javax.wsdl

Examples of javax.wsdl.Types


            }
        }
    }

    private void extractSchema(Definition def, SchemaCollection schemaCol, List<SchemaInfo> schemaInfos) {
        Types typesElement = def.getTypes();
        if (typesElement != null) {
            int schemaCount = 1;
            for (Object obj : typesElement.getExtensibilityElements()) {
                org.w3c.dom.Element schemaElem = null;
                if (obj instanceof Schema) {
                    Schema schema = (Schema)obj;
                    schemaElem = schema.getElement();
                } else if (obj instanceof UnknownExtensibilityElement) {
View Full Code Here


        }
    }

    // Workaround for getting the elements
    private void getSchemaList(Definition def) {
        Types typesElement = def.getTypes();
        if (typesElement != null) {
            Iterator<?> ite = typesElement.getExtensibilityElements().iterator();
            while (ite.hasNext()) {
                Object obj = ite.next();
                if (obj instanceof Schema) {
                    Schema schema = (Schema)obj;
                    addSchema(schema.getDocumentBaseURI(), schema);
View Full Code Here

       
       
        /* This doesn't actually work.   Setting setSchemaLocationURI on the import
        * for some reason doesn't actually result in the new URI being written
        * */
        Types types = def.getTypes();
        if (types != null) {
            for (ExtensibilityElement el
                : CastUtils.cast(types.getExtensibilityElements(), ExtensibilityElement.class)) {
                if (el instanceof Schema) {
                    Schema see = (Schema)el;
                    updateSchemaImports(bus, see, see.getDocumentBaseURI(), doneSchemas, base);
                }
            }
View Full Code Here

            writeSchemaDefinition(definition, schemaWriter);           
            manager.addWSDLSchemaImport(def, schema.getTargetNamespace(), schemaFilename);
        } else {
            // checks for -n option
            if (importSchemaFilename == null) {               
                Types types = definition.getTypes();
                def.setTypes(types);
            } else {               
                manager.addWSDLSchemaImport(def, schema.getTargetNamespace(), importSchemaFilename);
            }
        }           
View Full Code Here

                              AxisService axisService,
                              Set visitedWSDLs)
            throws AxisFault {
        visitedWSDLs.add(wsdlDefinition.getDocumentBaseURI());
        // process all the types in all the wsdls
        Types types = wsdlDefinition.getTypes();
        if (types != null) {
            copyExtensibleElements(types.getExtensibilityElements(),
                                   wsdlDefinition,
                                   axisService,
                                   TYPES);
        }
View Full Code Here

     */

    private void populateSchemaMap(Definition definition, Set visitedWSDLs) {
        visitedWSDLs.add(definition.getDocumentBaseURI());
        // first process the types in the given wsdl
        Types types = definition.getTypes();
        Object extensibilityElement;
        if (types != null) {
            for (Iterator iterator = types.getExtensibilityElements().iterator(); iterator.hasNext();)
            {
                extensibilityElement = iterator.next();
                if (extensibilityElement instanceof Schema) {
                    Element schemaElement = ((Schema) extensibilityElement).getElement();
                    schemaMap.put(schemaElement.getAttribute(XSD_TARGETNAMESPACE), schemaElement);
View Full Code Here

        }
    }

    private void addImportsFromDefinition(Definition definition, List schemaList) throws DeploymentException {
        Map namespaceMap = definition.getNamespaces();
        Types types = definition.getTypes();
        if (types != null) {
            List schemas = types.getExtensibilityElements();
            for (Iterator iterator = schemas.iterator(); iterator.hasNext();) {
                Object o = iterator.next();
                if (o instanceof Schema) {
                    Schema unknownExtensibilityElement = (Schema) o;
                    QName elementType = unknownExtensibilityElement.getElementType();
View Full Code Here

    }

    @Override
    public void addTypes(Definition definition) throws WSDLException {
        Assert.notNull(getSchemaCollection(), "setting 'schema' or 'schemaCollection' is required");
        Types types = definition.createTypes();
        XsdSchema[] schemas = schemaCollection.getXsdSchemas();
        for (int i = 0; i < schemas.length; i++) {
            if (logger.isDebugEnabled()) {
                logger.debug("Inlining " + schemas[i]);
            }
            if (schemas.length == 1) {
                definition.addNamespace(SCHEMA_PREFIX, schemas[i].getTargetNamespace());
            }
            else {
                String prefix = SCHEMA_PREFIX + i;
                definition.addNamespace(prefix, schemas[i].getTargetNamespace());
            }
            Element schemaElement = getSchemaElement(schemas[i]);
            Schema schema = (Schema) definition.getExtensionRegistry()
                    .createExtension(Types.class, new QName("http://www.w3.org/2001/XMLSchema", "schema"));
            types.addExtensibilityElement(schema);
            schema.setElement(schemaElement);
        }
        definition.setTypes(types);
    }
View Full Code Here

    private static final Log logger = LogFactory.getLog(DefaultMessagesProvider.class);

    @Override
    public void addMessages(Definition definition) throws WSDLException {
        Types types = definition.getTypes();
        Assert.notNull(types, "No types element present in definition");
        for (Iterator<?> iterator = types.getExtensibilityElements().iterator(); iterator.hasNext();) {
            ExtensibilityElement extensibilityElement = (ExtensibilityElement) iterator.next();
            if (extensibilityElement instanceof Schema) {
                Schema schema = (Schema) extensibilityElement;
                if (schema.getElement() != null) {
                    createMessages(definition, schema.getElement());
View Full Code Here

       
       
        /* This doesn't actually work.   Setting setSchemaLocationURI on the import
        * for some reason doesn't actually result in the new URI being written
        * */
        Types types = def.getTypes();
        if (types != null) {
            for (ExtensibilityElement el
                : CastUtils.cast((List)types.getExtensibilityElements(), ExtensibilityElement.class)) {
                if (el instanceof Schema) {
                    Schema see = (Schema)el;
                    updateSchemaImports(see, doneSchemas, base);
                }
            }
View Full Code Here

TOP

Related Classes of javax.wsdl.Types

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.