Examples of Types


Examples of javax.wsdl.Types

        }
        return null;
    }

    private static List<javax.wsdl.extensions.schema.Schema> getSchemas(Definition definition) {
        Types types = definition.getTypes();
        List<javax.wsdl.extensions.schema.Schema> schemaList =
            new ArrayList<javax.wsdl.extensions.schema.Schema>();
        if (types != null) {
            for (Object o : types.getExtensibilityElements()) {
                if (o instanceof javax.wsdl.extensions.schema.Schema) {
                    javax.wsdl.extensions.schema.Schema s =
                        (javax.wsdl.extensions.schema.Schema)o;
                    schemaList.add(s);
                }
View Full Code Here

Examples of javax.wsdl.Types

        }
    }

    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

Examples of javax.wsdl.Types

            importedDefinitions.add(impt.getDefinition());
        }
    }

    private void extractSchema(Definition def) {
        Types typesElement = def.getTypes();
        if (typesElement != null) {
            Iterator ite = typesElement.getExtensibilityElements().iterator();
            while (ite.hasNext()) {
                Object obj = ite.next();
                org.w3c.dom.Element schemaElem = null;
                if (obj instanceof Schema) {
                    Schema schema = (Schema) obj;
View Full Code Here

Examples of javax.wsdl.Types

            throw new JAXBException(ex.getMessage());
        }
    }   

    private void attachSchema() throws Exception {
        Types types = definition.createTypes();
        Schema wsdlSchema = (Schema)
            definition.getExtensionRegistry().createExtension(Types.class,
                                                              new QName(Constants.URI_2001_SCHEMA_XSD,
                                                                        "schema"));

        // See if a NamespaceMap has already been added to the schema (this can be the case with object
        // references.  If so, simply add the XSD URI to the map.  Otherwise, create a new one.
        NamespaceMap nsMap = null;
        try {
            nsMap = (NamespaceMap)schema.getNamespaceContext();
        } catch (ClassCastException ex) {
            // Consume.  This will mean that the context has not been set.
        }
        if (nsMap == null) {
            nsMap = new NamespaceMap();
            nsMap.add("xs", Constants.URI_2001_SCHEMA_XSD);
            schema.setNamespaceContext(nsMap);
        } else {
            nsMap.add("xs", Constants.URI_2001_SCHEMA_XSD);
        }
        org.w3c.dom.Element el = XmlSchemaSerializer.serializeSchema(schema, true)[0].getDocumentElement();
        wsdlSchema.setElement(el);
       
        types.addExtensibilityElement(wsdlSchema);

        definition.setTypes(types);
    }
View Full Code Here

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

Examples of javax.wsdl.Types

        }
    }

    // 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

Examples of javax.wsdl.Types

       
       
        /* 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

Examples of javax.wsdl.Types

            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

Examples of javax.wsdl.Types

                              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

Examples of javax.wsdl.Types

     */

    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
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.