Examples of BeanPropertyDescriptor


Examples of org.apache.axis.utils.BeanPropertyDescriptor

        String base = "string";
        for (int i=0; i<propertyDescriptor.length; i++) {
            if (! propertyDescriptor[i].getName().equals("value"))
                continue;
           
            BeanPropertyDescriptor bpd = propertyDescriptor[i];
            Class type = bpd.getType();
            // Attribute must extend a simple type.
            if (!types.isSimpleSchemaType(type))
                throw new AxisFault(JavaUtils.getMessage("AttrNotSimpleType01",
                        type.getName()));
           
View Full Code Here

Examples of org.apache.axis.utils.BeanPropertyDescriptor

        // if this type is a SimpleType bean, get bean properties
        if (SimpleType.class.isAssignableFrom(javaType)) {
            this.pd = BeanUtils.getPd(javaType);
            // loop through properties and grab the names for later
            for (int i = 0; i < pd.length; i++) {
                BeanPropertyDescriptor descriptor = pd[i];
                propertyMap.put(descriptor.getName(), descriptor);
            }

            typeDesc = TypeDesc.getTypeDescForClass(javaType);
        }       
    }
View Full Code Here

Examples of org.apache.axis.utils.BeanPropertyDescriptor

        // if this type is a SimpleType bean, get bean properties
        if (SimpleType.class.isAssignableFrom(javaType)) {
            this.pd = BeanUtils.getPd(javaType);
            // loop through properties and grab the names for later
            for (int i = 0; i < pd.length; i++) {
                BeanPropertyDescriptor descriptor = pd[i];
                propertyMap.put(descriptor.getName(), descriptor);
            }
        }       
    }   
View Full Code Here

Examples of org.apache.axis.utils.BeanPropertyDescriptor

                continue;

            String attrName = attributes.getLocalName(i);

            // look for the attribute property
            BeanPropertyDescriptor bpd =
                    (BeanPropertyDescriptor) propertyMap.get(fieldName);
            if (bpd != null) {
                if (!bpd.isWriteable() || bpd.isIndexed() ) continue ;

                // determine the QName for this child element
                TypeMapping tm = context.getTypeMapping();
                Class type = bpd.getType();
                QName qn = tm.getTypeQName(type);
                if (qn == null)
                    throw new SAXException(
                            JavaUtils.getMessage("unregistered00", type.toString()));

                // get the deserializer
                Deserializer dSer = context.getDeserializerForType(qn);
                if (dSer == null)
                    throw new SAXException(
                            JavaUtils.getMessage("noDeser00", type.toString()));
                if (! (dSer instanceof SimpleDeserializer))
                    throw new SAXException(
                            JavaUtils.getMessage("AttrNotSimpleType00",
                                                 bpd.getName(),
                                                 type.toString()));

                // Success!  Create an object from the string and save
                // it in our attribute map for later.
                if (attributeMap == null) {
View Full Code Here

Examples of org.apache.axis.utils.BeanPropertyDescriptor

        for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
            Map.Entry entry = (Map.Entry) iterator.next();
            String name = (String) entry.getKey();
            Object val = entry.getValue();
           
            BeanPropertyDescriptor bpd =
                    (BeanPropertyDescriptor) propertyMap.get(name);
            if (!bpd.isWriteable() || bpd.isIndexed()) continue;
            try {
                bpd.set(value, val );
            } catch (Exception e) {
                throw new SAXException(e);
            }
        }
    }
View Full Code Here

Examples of org.apache.axis.utils.BeanPropertyDescriptor

                    }
                }
                continue;
            }

            BeanPropertyDescriptor bpd = propertyDescriptor[i];
            Class type = bpd.getType();
            // Attribute must extend a simple type, enum or SimpleType
            if (!types.isAcceptableAsAttribute(type)) {
                throw new AxisFault(Messages.getMessage("AttrNotSimpleType01",
                        type.getName()));
            }
View Full Code Here

Examples of org.apache.axis.utils.BeanPropertyDescriptor

        } else {
            BeanPropertyDescriptor[] pd = BeanUtils.getPd(javaType, null);
            propertyMap = new HashMap();
            // loop through properties and grab the names for later
            for (int i = 0; i < pd.length; i++) {
                BeanPropertyDescriptor descriptor = pd[i];
                propertyMap.put(descriptor.getName(), descriptor);
            }
        }

        return propertyMap;
    }
View Full Code Here

Examples of org.apache.axis.utils.BeanPropertyDescriptor

                    }
                }
                continue;
            }

            BeanPropertyDescriptor bpd = propertyDescriptor[i];
            Class type = bpd.getType();
            // Attribute must extend a simple type, enum or SimpleType
            if (!types.isAcceptableAsAttribute(type)) {
                throw new AxisFault(Messages.getMessage("AttrNotSimpleType01",
                        type.getName()));
            }
View Full Code Here

Examples of org.apache.axis.utils.BeanPropertyDescriptor

                        }
                    }
                }
            }

            BeanPropertyDescriptor anyDesc = typeDesc == null ? null :
                    typeDesc.getAnyDesc();
            if (anyDesc != null) {
                // If we have "extra" content here, it'll be an array
                // of MessageElements.  Serialize each one.
                Object anyVal = anyDesc.get(value);
                if (anyVal != null && anyVal instanceof MessageElement[]) {
                    MessageElement [] anyContent = (MessageElement[])anyVal;
                    for (int i = 0; i < anyContent.length; i++) {
                        MessageElement element = anyContent[i];
                        element.output(context);
View Full Code Here

Examples of org.apache.axis.utils.BeanPropertyDescriptor

            }

            // Build the map
            propertyMap = new HashMap();
            for (int i = 0; i < propertyDescriptors.length; i++) {
                BeanPropertyDescriptor descriptor = propertyDescriptors[i];
                propertyMap.put(descriptor.getName(), descriptor);
            }
        }
        return propertyMap;
    }
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.