Examples of XmlSchema


Examples of javax.xml.bind.annotation.XmlSchema

    if (element != null) {
      _qname = qnameFromXmlElement(element);
      _nillable = element.nillable();
    }
    else {
      XmlSchema xmlSchema = accessor.getPackageAnnotation(XmlSchema.class);

      if (xmlSchema != null &&
          xmlSchema.elementFormDefault() == XmlNsForm.QUALIFIED)
        _qname = new QName(xmlSchema.namespace(), accessor.getName());
      else
        _qname = new QName(accessor.getName());

      if (! _property.isXmlPrimitiveType())
        _context.createSkeleton(accessor.getType());
View Full Code Here

Examples of javax.xml.bind.annotation.XmlSchema

    String namespace = context.getTargetNamespace();

    Package pkg = cl.getPackage();

    // look at package defaults first...
    XmlSchema schema = (XmlSchema) pkg.getAnnotation(XmlSchema.class);

    if (schema != null && ! "".equals(schema.namespace()))
      namespace = schema.namespace();

    if (cl.isAnnotationPresent(XmlType.class)) {
      XmlType xmlType = (XmlType) cl.getAnnotation(XmlType.class);

      if (! "##default".equals(xmlType.name()))
View Full Code Here

Examples of javax.xml.bind.annotation.XmlSchema

            if (elAnnot != null) {
                String name = elAnnot.name();
                String ns = elAnnot.namespace();
                if (StringUtils.isEmpty(ns)
                    || "##default".equals(ns)) {
                    XmlSchema schema = null;
                    if (cls.getPackage() != null) {
                        schema = cls.getPackage().getAnnotation(XmlSchema.class);
                    }
                    if (schema != null) {
                        ns = schema.namespace();
                    }
                }
                if (!StringUtils.isEmpty(ns) && !StringUtils.isEmpty(name)) {
                    if (namespace != null) {
                        helper.setJaxbNamespace(ns);
View Full Code Here

Examples of javax.xml.bind.annotation.XmlSchema

        String namespace = xre == null ? "##default" : xre.namespace();
        if ("##default".equals(name)) {
            name = java.beans.Introspector.decapitalize(cls.getSimpleName());
        }
        if ("##default".equals(namespace) && cls.getPackage() != null) {
            XmlSchema sc = cls.getPackage().getAnnotation(XmlSchema.class);
            if (sc != null) {
                namespace = sc.namespace();
            }
        }       
        if ("##default".equals(namespace) || StringUtils.isEmpty(namespace)) {
            namespace = JAXBUtils.getPackageNamespace(cls);
            if (namespace == null) {
View Full Code Here

Examples of javax.xml.bind.annotation.XmlSchema

            jaxWsConfiguration.setServiceFactory(this);
            getServiceConfigurations().add(0, jaxWsConfiguration);

            Class<?> seiClass = ii.getEndpointClass();
            if (seiClass != null && seiClass.getPackage() != null) {
                XmlSchema schema = seiClass.getPackage().getAnnotation(XmlSchema.class);
                if (schema != null && XmlNsForm.QUALIFIED.equals(schema.elementFormDefault())) {
                    setQualifyWrapperSchema(true);
                }
            }
            setMethodDispatcher(new JAXWSMethodDispatcher(implInfo));
        }
View Full Code Here

Examples of javax.xml.bind.annotation.XmlSchema

      namespace = null;
    }

    if (namespace == null) {
      Package itemPackage = clazz.getPackage();
      XmlSchema xmlSchema = itemPackage.getAnnotation(XmlSchema.class);
      if (xmlSchema != null) {
        namespace = getXmlNamespace(xmlSchema);
      }
    }
View Full Code Here

Examples of oracle.xml.parser.schema.XMLSchema

     * @param xmlSchemaURL - the schema URL
     * @param errorHandler - the error handler
     * @return true if the document fragment is valid, false otherwise
     */
    public boolean validateDocument(Document document, URL xmlSchemaURL, ErrorHandler errorHandler) throws XMLPlatformException {
        XMLSchema xmlSchema = null;
        XSDValidator validator = null;
        try {
            Object[] args = { xmlSchemaURL };
            xmlSchema = (XMLSchema)buildSchemaMethod.invoke(new XSDBuilder(), args);
            validator = new XSDValidator();
View Full Code Here

Examples of org.apache.axis.xsd.xml.schema.XmlSchema

                    Stack importedSchemaStack = schema.getImportedSchemaStack();
                    //compile these schemas
                    while (!importedSchemaStack.isEmpty()) {
                        Element el = ((javax.wsdl.extensions.schema.Schema)importedSchemaStack.pop()).getElement();
                        XmlSchema thisSchema = schemaColl.read(el);
                        xmlObjectsVector.add(thisSchema);
                    }
                }

                //create the type mapper
View Full Code Here

Examples of org.apache.axis2.rmi.metadata.xml.XmlSchema

    }

    protected void registerXmlType(Map schemaMap) {
        if (schemaMap.get(this.namespace) == null) {
            // create a new namespace for this schema
            schemaMap.put(this.namespace, new XmlSchema(this.namespace));
        }
        XmlSchema xmlSchema = (XmlSchema) schemaMap.get(this.namespace);
        xmlSchema.addComplexType(this.xmlType);
    }
View Full Code Here

Examples of org.apache.ws.commons.schema.XmlSchema

        documentBuilderFactory.setNamespaceAware(true);
        Document doc = documentBuilderFactory.newDocumentBuilder().parse(Resources.asURI("importBase.xsd"));

        XmlSchemaCollection schemaCol = new XmlSchemaCollection();
        schemaCol.setBaseUri(Resources.TEST_RESOURCES);
        XmlSchema schema = schemaCol.read(doc, null);
        assertNotNull(schema);

        // attempt with slash now
        schemaCol = new XmlSchemaCollection();
        schemaCol.setBaseUri(Resources.TEST_RESOURCES + "/");
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.