Package org.apache.axis2.jaxws.runtime.description.marshal

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


    public AnnotationDesc getAnnotationDesc(Class cls) {
      if (log.isDebugEnabled()) {
        log.debug("getAnnotationDesc for class " + cls);
      }
        String className = cls.getCanonicalName();    
        AnnotationDesc aDesc = annotationMap.get(className);
        if (aDesc == null) {
            // Cache miss
          if (log.isDebugEnabled()) {
            log.debug("creating AnnotationDesc");
          }
View Full Code Here


   
    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

                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

     *
     * @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

                                              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

                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

      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

      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

      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

      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

TOP

Related Classes of org.apache.axis2.jaxws.runtime.description.marshal.AnnotationDesc

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.