Package javax.wsdl.extensions.schema

Examples of javax.wsdl.extensions.schema.Schema


                axisService.setEndpoint(soapAddress.getLocationURI());
            } else if (wsdl4jElement instanceof SOAPAddress) {
                SOAPAddress soapAddress = (SOAPAddress) wsdl4jElement;
                axisService.setEndpoint(soapAddress.getLocationURI());
            } else if (wsdl4jElement instanceof Schema) {
                Schema schema = (Schema) wsdl4jElement;
                // just add this schema - no need to worry about the imported
                // ones
                axisService.addSchema(getXMLSchema(schema.getElement(), schema
                        .getDocumentBaseURI()));
            } else if (wsdl4jElement instanceof SOAP12Operation) {
                SOAP12Operation soapOperation = (SOAP12Operation) wsdl4jElement;
                if (description instanceof AxisOperation) {
                    AxisOperation axisOperation = (AxisOperation) description;
View Full Code Here


                    schema.setAttribute("elementFormDefault", "unqualified");
                    schema.setAttribute("attributeFormDefault", "qualified");
                    schema.setAttribute("targetNamespace", targetNS);
                    schema.setAttributeNS(XMLNS_NS, "xmlns:xs", SCHEMA_NS);
                    schemaDoc.appendChild(schema);
                    Schema schemaExt = createSchemaExt(definition);
                    schemaExt.setElement(schema);
                    prefixMaps.put(schema, new HashMap<String, String>());
                    xsDef = xsdFactory.createXSDefinition();
                    xsDef.setUnresolved(true);
                    xsDef.setNamespace(targetNS);
                    xsDef.setDocument(schemaDoc);
View Full Code Here

                }
            }
            loadXSD(schemaCollection, xsDef);
            wsdlDefinition.getXmlSchemas().add(xsDef);
            Element schema = document.getDocumentElement();
            Schema schemaExt = createSchemaExt(definition);
            schemaExt.setDocumentBaseURI(document.getDocumentURI());
            schemaExt.setElement(schema);
        }
    }
View Full Code Here

        if (types == null) {
            types = definition.createTypes();
            definition.setTypes(types);
        }

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

        return schemaExt;
    }
View Full Code Here

        Iterator<Schema> schemaIt = definition.getTypes().getExtensibilityElements().iterator();

        List<String> schemaTargetNameSpaceList = new ArrayList<String>();
        while (schemaIt.hasNext()) {
            Schema schema = schemaIt.next();
            String targetNameSpace = schema.getElement().getAttribute("targetNamespace");
            schemaTargetNameSpaceList.add(targetNameSpace);
        }

        // There should be type definitions for the service and the model
        // namespace
View Full Code Here

        Types types = def.getTypes();
        if (types != null) {
            for (Iterator it = types.getExtensibilityElements().iterator(); it.hasNext();) {
                ExtensibilityElement ee = (ExtensibilityElement) it.next();
                if (ee instanceof Schema) {
                    Schema schema = (Schema) ee;
                    Map schemaImports = schema.getImports();
                    for (Iterator iter = schemaImports.values().iterator(); iter.hasNext();) {
                        List imps = (List) iter.next();
                        for (Iterator iterator = imps.iterator(); iterator.hasNext();) {
                            SchemaImport schemaImport = (SchemaImport) iterator.next();
                            Schema schemaImp = schemaImport.getReferencedSchema();
                            String schemaLoc = schemaImport.getSchemaLocationURI();
                            if (schemaLoc != null && schemaImp != null && schemaImp.getElement() != null && !URI.create(schemaLoc).isAbsolute()) {
                                wsdls.put(schemaLoc, schemaImp.getElement());
                            }
                        }
                    }
                }
            }
View Full Code Here

                    schema.setAttribute("elementFormDefault", "unqualified");
                    schema.setAttribute("attributeFormDefault", "qualified");
                    schema.setAttribute("targetNamespace", targetNS);
                    schema.setAttributeNS(XMLNS_NS, "xmlns:xs", SCHEMA_NS);
                    schemaDoc.appendChild(schema);
                    Schema schemaExt = createSchemaExt(definition);
                    schemaExt.setElement(schema);
                    prefixMaps.put(schema, new HashMap<String, String>());
                    xsDef = xsdFactory.createXSDefinition();
                    xsDef.setUnresolved(true);
                    xsDef.setNamespace(targetNS);
                    xsDef.setDocument(schemaDoc);
View Full Code Here

                }
            }
            loadXSD(schemaCollection, xsDef);
            wsdlDefinition.getXmlSchemas().add(xsDef);
            Element schema = document.getDocumentElement();
            Schema schemaExt = createSchemaExt(definition);
            schemaExt.setDocumentBaseURI(document.getDocumentURI());
            schemaExt.setElement(schema);
        }
    }
View Full Code Here

        if (types == null) {
            types = definition.createTypes();
            definition.setTypes(types);
        }

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

        return schemaExt;
    }
View Full Code Here

    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

TOP

Related Classes of javax.wsdl.extensions.schema.Schema

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.