Examples of AnnotationDesc


Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

   
    public AnnotationDesc getAnnotationDesc(String clsName) {
      if (log.isDebugEnabled()) {
        log.debug("getAnnotationDesc for " + clsName);
      }
        AnnotationDesc aDesc = annotationMap.get(clsName);
        if (log.isDebugEnabled()) {
        log.debug("getAnnotationDesc is " + aDesc);
      }
        return aDesc;
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

                set.add("[" + tClass.getCanonicalName() + "]")// Indicates a actual class reference
            }
            // If there is an xmlType, and it maps to a package then add
            // an override if the package is different.
            if (pkg != null) {
                AnnotationDesc ad = msrd.getAnnotationDesc(tClass);
                if (ad != null && ad.hasXmlType()) {
                    String ns = ad.getXmlTypeNamespace();
                    if (ns != null && ns.length() > 0) {
                        List pkgs = makePackages(ns);
                        if (pkgs != null) {
                            for (int i=0; i<pkgs.size(); i++) {
                                String pkg2 = (String) pkgs.get(i);
                                if (!pkg.equals(pkg2)) {
                                    String override = pkg + " > " + pkg2;
                                    if (!set.contains(override)) {
                                        set.add(override);
                                        if (log.isDebugEnabled()) {
                                            log.debug("Adding override=" + override);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            addXmlSeeAlsoPackages(tClass, msrd, set);
        }

        // Set the package for the element
        if (tClass != eClass) {
            if (eClass == null) {
                // A null or empty namespace indicates that the element is
                // unqualified.  This can occur if the parameter is represented as a child element
                // in doc/lit wrapped.  The package is determined from the wrapper element in such casses.
                if (namespace != null && namespace.length() > 0) {
                    // Use default namespace to package algorithm
                    List pkgs = makePackages(namespace);
                    if (pkgs != null) {
                        set.addAll(pkgs);
                    }
                }
            } else {
                Package elementPkg = eClass.getPackage();
                String pkg = (elementPkg != null) ? elementPkg.getName() : null;
                if (pkg != null) {
                    set.add(pkg);
                    set.add("@" + pkg)// Indicates a package from an actual class reference (versus namespace)
                    set.add("[" + eClass.getCanonicalName() + "]")// Indicates a actual class reference
                }
               
                if (pkg != null) {
                    AnnotationDesc ad = msrd.getAnnotationDesc(tClass);
                    if (ad != null && ad.hasXmlRootElement()) {
                        String ns = ad.getXmlRootElementNamespace();
                        if (ns != null && ns.length() > 0) {
                            List pkgs = makePackages(ns);
                            if (pkgs != null) {
                                for (int i=0; i<pkgs.size(); i++) {
                                    String pkg2 = (String) pkgs.get(i);
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

     *
     * @param cls Class
     * @return Class or null
     */
    private static Class getElement(Class cls, MarshalServiceRuntimeDescription msrd) {
        AnnotationDesc annotationDesc = msrd.getAnnotationDesc(cls);
        if (annotationDesc == null) {
            // This shouldn't happen
            annotationDesc = AnnotationDescImpl.create(cls);
        }
        if (annotationDesc.hasXmlRootElement()) {
            return cls;
        }
        return null;
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

                                              TreeSet<String> set) {
      if (log.isDebugEnabled()) {
        log.debug("start addXmlSeeAlsoPackages for " + clz);
      }
        if (clz != null) {
            AnnotationDesc aDesc = msrd.getAnnotationDesc(clz);
            if (aDesc != null) {
                Class[] seeAlso = aDesc.getXmlSeeAlsoClasses();
                if (seeAlso != null) {
                    for (int i=0; i<seeAlso.length; i++) {
                        String pkg =
                            (seeAlso[i] == null) ? null :
                                (seeAlso[i].getPackage() == null) ? "" :
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

                cls == BigInteger.class ||
                cls == BigDecimal.class) {

            return true;
        }
        AnnotationDesc aDesc = marshalDesc.getAnnotationDesc(cls);
        if (aDesc != null) {
            // XmlRootElementName returns null if @XmlRootElement is not specified
            return (aDesc.getXmlRootElementName() == null);
        }
        return true
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

      boolean isRootElement = false;
    String wrapperClassName = msrd.getRequestWrapperClassName(opDesc);
      try {
     
      if (wrapperClassName != null) {
        AnnotationDesc aDesc = msrd.getAnnotationDesc(wrapperClassName);
        if (aDesc == null) {
          Class cls = loadClass(wrapperClassName, endpointDesc);
          aDesc = msrd.getAnnotationDesc(cls);
        }
        isRootElement = aDesc.hasXmlRootElement();
      }
     
    } catch (Throwable t) {
      if (log.isDebugEnabled()) {
        log.debug("An error occurred while processing class " + wrapperClassName + " exception is " + t);
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

      boolean isRootElement = false;
    String wrapperClassName = msrd.getResponseWrapperClassName(opDesc);
      try {
     
      if (wrapperClassName != null) {
        AnnotationDesc aDesc = msrd.getAnnotationDesc(wrapperClassName);
        if (aDesc == null) {
          Class cls = loadClass(wrapperClassName, endpointDesc);
          aDesc = msrd.getAnnotationDesc(cls);
        }
        isRootElement = aDesc.hasXmlRootElement();
      }
     
    } catch (Throwable t) {
      if (log.isDebugEnabled()) {
        log.debug("An error occurred while processing class " + wrapperClassName + " exception is " + t);
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

      boolean isRootElement = false;
    String wrapperClassName = msrd.getRequestWrapperClassName(opDesc);
      try {
     
      if (wrapperClassName != null) {
        AnnotationDesc aDesc = msrd.getAnnotationDesc(wrapperClassName);
        if (aDesc == null) {
          Class cls = loadClass(wrapperClassName, endpointDesc);
          aDesc = msrd.getAnnotationDesc(cls);
        }
        isRootElement = aDesc.hasXmlRootElement();
      }
     
    } catch (Throwable t) {
      if (log.isDebugEnabled()) {
        log.debug("An error occurred while processing class " + wrapperClassName + " exception is " + t);
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

      boolean isRootElement = false;
    String wrapperClassName = msrd.getResponseWrapperClassName(opDesc);
      try {
     
      if (wrapperClassName != null) {
        AnnotationDesc aDesc = msrd.getAnnotationDesc(wrapperClassName);
        if (aDesc == null) {
          Class cls = loadClass(wrapperClassName, endpointDesc);
          aDesc = msrd.getAnnotationDesc(cls);
        }
        isRootElement = aDesc.hasXmlRootElement();
      }
     
    } catch (Throwable t) {
      if (log.isDebugEnabled()) {
        log.debug("An error occurred while processing class " + wrapperClassName + " exception is " + t);
View Full Code Here

Examples of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

    private static void addAnnotation(EndpointDescription endpointDesc, Class cls, Map<String, AnnotationDesc> map) {

        String className = cls.getCanonicalName();
        if (map.get(className) == null) {
            AnnotationDesc desc = AnnotationDescImpl.create(cls);
            map.put(className, desc);
            if (cls.isPrimitive()) {
                Class class2 = ClassUtils.getWrapperClass(cls);
                AnnotationDesc desc2 = AnnotationDescImpl.create(class2);
                map.put(class2.getCanonicalName(), desc2);
            } else {
                Class class2 = ClassUtils.getPrimitiveClass(cls);
                if (class2 != null) {
                    AnnotationDesc desc2 = AnnotationDescImpl.create(class2);
                    map.put(class2.getCanonicalName(), desc2);
                }
            }
           
            // Inspect the interfaces.  This is done to pick up other
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.