Package org.apache.axis.description

Examples of org.apache.axis.description.TypeDesc


  public Object deserialize(InputStream is, Hashtable extendedContext) throws Exception{
 
    //getting deserializer
    Class targetCls = (Class)extendedContext.get("targetClass");
    Object objectOfTargetCls = targetCls.newInstance()
    TypeDesc desc = (TypeDesc)objectOfTargetCls.getClass().getMethod("getTypeDesc", new Class[]{}).invoke(objectOfTargetCls, new Object[]{});
    final QName xmlType;// = desc.getXmlType();
    xmlType = new QName("http://" + objectOfTargetCls.getClass().getName(), org.uengine.util.UEngineUtil.getClassNameOnly(objectOfTargetCls.getClass()) );
          Deserializer dser =
      (Deserializer)objectOfTargetCls.getClass().getMethod("getDeserializer", new Class[]{String.class, Class.class, QName.class})
        .invoke(objectOfTargetCls, new Object[]{"", objectOfTargetCls.getClass(), xmlType});
View Full Code Here


    } catch (Exception e) {
System.out.println("can't replace classloader");
    }
   
    try{   
      TypeDesc desc = (TypeDesc)sourceObj.getClass().getMethod("getTypeDesc", new Class[]{}).invoke(sourceObj, new Object[]{});
      QName xmlType = desc.getXmlType();
      //
      //xmlType = (QName)extendedContext.get("qName");
      //
      xmlType = new QName("http://" + sourceObj.getClass().getName(), org.uengine.util.UEngineUtil.getClassNameOnly(sourceObj.getClass()) );
//      xmlType = new QName(Constants.URI_SOAP11_ENV, Constants.ELEM_ENVELOPE );
View Full Code Here

  public Object deserialize(InputStream is, Hashtable extendedContext) throws Exception{
 
    //getting deserializer
    Class targetCls = (Class)extendedContext.get("targetClass");
    Object objectOfTargetCls = targetCls.newInstance()
    TypeDesc desc = (TypeDesc)objectOfTargetCls.getClass().getMethod("getTypeDesc", new Class[]{}).invoke(objectOfTargetCls, new Object[]{});
    final QName xmlType;// = desc.getXmlType();
    xmlType = new QName("http://" + objectOfTargetCls.getClass().getName(), org.uengine.util.UEngineUtil.getClassNameOnly(objectOfTargetCls.getClass()) );
          Deserializer dser =
      (Deserializer)objectOfTargetCls.getClass().getMethod("getDeserializer", new Class[]{String.class, Class.class, QName.class})
        .invoke(objectOfTargetCls, new Object[]{"", objectOfTargetCls.getClass(), xmlType});
View Full Code Here

    public FieldDesc[] getFields() {
        return fields;
    }

    public TypeDesc buildTypeDesc() {
        TypeDesc typeDesc = new TypeDesc(clazz, canSearchParents);
        typeDesc.setXmlType(qName);
        typeDesc.setFields(fields);
        return typeDesc;
    }
View Full Code Here

        if (propDesc == null) {
            Class superClass = javaType;
            while (superClass != null && propDesc == null) {
                superClass = superClass.getSuperclass();
                if (superClass != null) {
                    TypeDesc td = TypeDesc.getTypeDescForClass(superClass);
                    if (td != null) {
                        String fieldName =
                            td.getFieldNameForElement(elemQName,
                                                      false);
                        if (fieldName == null &&
                            (prefix == null || prefix.equals(""))) {
                            fieldName =
                                td.getFieldNameForElement(
                                new QName("", elemQName.getLocalPart()), false);
                        }
                       
                        propDesc =
                            (BeanPropertyDescriptor)propertyMap.get(fieldName);
View Full Code Here

    public FieldDesc[] getFields() {
        return fields;
    }

    public TypeDesc buildTypeDesc() {
        TypeDesc typeDesc = new TypeDesc(clazz, canSearchParents);
        typeDesc.setXmlType(qName);
        typeDesc.setFields(fields);
        return typeDesc;
    }
View Full Code Here

    public FieldDesc[] getFields() {
        return fields;
    }

    public TypeDesc buildTypeDesc() {
        final TypeDesc typeDesc = new TypeDesc(clazz, canSearchParents);
        typeDesc.setXmlType(qName);
        typeDesc.setFields(fields);
        return typeDesc;
    }
View Full Code Here

            Element extension = types.createElement("extension");
            complexContent.appendChild(extension);
            extension.setAttribute("base", base);
            e = extension;
            // Get the property descriptors for the super class
            TypeDesc superTypeDesc = TypeDesc.getTypeDescForClass(superClass);
            if (superTypeDesc != null) {
                superPd = superTypeDesc.getPropertyDescriptors();
            } else {
                superPd = BeanUtils.getPd(superClass, null);
            }
        } else {
            e = complexType;
View Full Code Here

            // if no serializer was configured try to find one dynamically using WSDLJava
            // generated metadata
            Class cls = value.getClass();
            Serializer serializer = getSerializerFromClass(cls, elemQName);
            if (serializer != null) {
                TypeDesc typedesc = TypeDesc.getTypeDescForClass(value.getClass());
                if (typedesc != null) {
                    QName qname = typedesc.getXmlType();
                    if (qname != null) {
                        writeXMLType = qname;
                    }
                }
                serializer.serialize(elemQName, attributes, value, this);
View Full Code Here

        }
        Deserializer dser = null;
        try {
            Method method = cls.getMethod(DESERIALIZER_METHOD, DESERIALIZER_CLASSES);
            if (method != null) {
                TypeDesc typedesc = TypeDesc.getTypeDescForClass(cls);
                if (typedesc != null) {
                    dser = (Deserializer) method.invoke(null,
                        new Object[] {msgContext.getEncodingStyle(), cls, typedesc.getXmlType()});
                }
            }
        } catch (Exception e) {
            log.error(Messages.getMessage("noDeser00", cls.getName()));
        }
View Full Code Here

TOP

Related Classes of org.apache.axis.description.TypeDesc

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.