Package javax.wsdl

Examples of javax.wsdl.Types


    private void readInlineSchemas(WSDLDefinition wsdlDefinition, Definition definition, ProcessorContext context) {
        if (contribution == null) {
            // Check null for test cases
            return;
        }
        Types types = definition.getTypes();
        if (types != null) {
            int index = 0;
            for (Object ext : types.getExtensibilityElements()) {
                ExtensibilityElement extElement = (ExtensibilityElement)ext;
                Element element = null;
                if (XSD_QNAME_LIST.contains(extElement.getElementType())) {
                    if (extElement instanceof Schema) {
                        element = ((Schema)extElement).getElement();
View Full Code Here


        }
    }   
   
    private static void modifySchemaImportsAndIncludes(Definition definition, String name) {
        // adjust the schema locations in types section
        Types types = definition.getTypes();
        if (types != null) {
            for (Iterator iter = types.getExtensibilityElements().iterator(); iter.hasNext();) {
                Object ext = iter.next();
                if (ext instanceof UnknownExtensibilityElement && XSD_QNAME_LIST
                    .contains(((UnknownExtensibilityElement)ext).getElementType())) {
                    changeLocations(((UnknownExtensibilityElement)ext).getElement(), name);
                }
View Full Code Here

            }
        }
    }

    public Schema createSchemaExt(Definition definition) throws WSDLException {
        Types types = definition.getTypes();
        if (types == null) {
            types = definition.createTypes();
            definition.setTypes(types);
        }

        Schema schemaExt = createSchema(definition);
        types.addExtensibilityElement(schemaExt);

        return schemaExt;
    }
View Full Code Here

       
        return false;
    }
   
    private boolean checkForElement(Definition def) throws Exception {
        Types types = def.getTypes();
        if (types != null) {
            for (ExtensibilityElement el : (List<ExtensibilityElement>)types.getExtensibilityElements()) {
                if (el instanceof Schema) {
                    Schema schema = (Schema)el;
                    boolean rs = checkForElement(schema);
                    if (rs) {
                        return true;
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

                }
                importMap.put(importId, docKey);
            }
        }

        Types types = def.getTypes();
        if (types != null) {
            for (ExtensibilityElement el : (List<ExtensibilityElement>)types.getExtensibilityElements()) {
                if (el instanceof Schema) {
                    Schema schema = (Schema)el;
                    updateSchemaImports(parentDocKey, schema, docMap, base);
                }
            }
View Full Code Here

        provider.setSchema(schema);

        provider.addTypes(definition);

        Types types = definition.getTypes();
        Assert.assertNotNull("No types created", types);
        Assert.assertEquals("Invalid amount of schemas", 1, types.getExtensibilityElements().size());

        Schema wsdlSchema = (Schema) types.getExtensibilityElements().get(0);
        Assert.assertNotNull("No element defined", wsdlSchema.getElement());
    }
View Full Code Here

        provider.setSchemaCollection(collection);

        provider.addTypes(definition);

        Types types = definition.getTypes();
        Assert.assertNotNull("No types created", types);
        Assert.assertEquals("Invalid amount of schemas", 2, types.getExtensibilityElements().size());

        Schema wsdlSchema = (Schema) types.getExtensibilityElements().get(0);
        Assert.assertNotNull("No element defined", wsdlSchema.getElement());

        wsdlSchema = (Schema) types.getExtensibilityElements().get(1);
        Assert.assertNotNull("No element defined", wsdlSchema.getElement());
    }
View Full Code Here

        String schemaNamespace = "http://www.springframework.org/spring-ws/schema";
        definition.addNamespace("schema", schemaNamespace);

        Resource resource = new ClassPathResource("schema.xsd", getClass());
        Document schemaDocument = documentBuilder.parse(SaxUtils.createInputSource(resource));
        Types types = definition.createTypes();
        definition.setTypes(types);
        Schema schema = (Schema) definition.getExtensionRegistry()
                .createExtension(Types.class, new QName("http://www.w3.org/2001/XMLSchema", "schema"));
        types.addExtensibilityElement(schema);
        schema.setElement(schemaDocument.getDocumentElement());

        provider.addMessages(definition);

        Assert.assertEquals("Invalid amount of messages created", 3, definition.getMessages().size());
View Full Code Here

        String schemaNamespace = "http://www.springframework.org/spring-ws/schema";
        definition.addNamespace("schema", schemaNamespace);

        Resource resource = new ClassPathResource("schema.xsd", getClass());
        Document schemaDocument = documentBuilder.parse(SaxUtils.createInputSource(resource));
        Types types = definition.createTypes();
        definition.setTypes(types);
        Schema schema = (Schema) definition.getExtensionRegistry()
                .createExtension(Types.class, new QName("http://www.w3.org/2001/XMLSchema", "schema"));
        types.addExtensibilityElement(schema);
        schema.setElement(schemaDocument.getDocumentElement());

        provider.addMessages(definition);

        Assert.assertEquals("Invalid amount of messages created", 2, definition.getMessages().size());
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.