Package javax.xml.bind.annotation

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


    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

            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

        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

            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

      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

            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

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

    public static XMLType getXmlTypeName(Class<?> javaType) {
        String namespace = null;
        String name = null;
        Package pkg = javaType.getPackage();
        if (pkg != null) {
            XmlSchema schema = pkg.getAnnotation(XmlSchema.class);
            if (schema != null) {
                namespace = schema.namespace();
            }
        }
        XmlType type = javaType.getAnnotation(XmlType.class);
        if (type != null) {
            String typeNamespace = type.namespace();
View Full Code Here

    }

    public PackageInfo getPackageInfoForPackage(JavaPackage pack, String packageName) {
        PackageInfo packageInfo = packageToPackageInfoMappings.get(packageName);
        if (packageInfo == null) {
            XmlSchema xmlSchema = (XmlSchema) helper.getAnnotation(pack, XmlSchema.class);
            packageInfo = new PackageInfo();
            NamespaceInfo namespaceInfo = null;
            if(xmlSchema != null) {
                namespaceInfo = findInfoForNamespace(xmlSchema.namespace());
            }
            if(namespaceInfo == null) {
                namespaceInfo = processNamespaceInformation(xmlSchema);
            }
           
View Full Code Here

TOP

Related Classes of javax.xml.bind.annotation.XmlSchema

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.