axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nilesh Ghorpade (JIRA)" <>
Subject [jira] Created: (AXIS2-2288) SimpleTypeMapper.getOMElement throws a NullPointerException in AXIS 2.1.1 release when given a java.util.List with some VO. In case of List of Strings it works fine.
Date Sun, 04 Mar 2007 09:36:50 GMT
SimpleTypeMapper.getOMElement throws a NullPointerException in AXIS 2.1.1 release when given
a java.util.List with some VO. In case of List of Strings it works fine.

                 Key: AXIS2-2288
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: adb
    Affects Versions: 1.1
         Environment: WIndows XP, AXIS 2.1.1 final release. 
            Reporter: Nilesh Ghorpade

Below is the method which is used for populating the List and serializaing and de-serializing
the same.

public void testConvertFromJavaToAXIS2_ListConverion() throws Exception{
				String namespace = "";
				String prefix = "vo";
				String localPart = "units";

				QName qnameList = new QName(namespace, localPart, prefix);
				List lstToConvertToOMElement = new ArrayList();

				//Populate the list with some data.

				List testUnits = new ArrayList();
				testUnits.add(new Integer(100));

				MySampleVO objSdmTableColumn = new MySampleVO("test_name",


				System.out.println(" lstToConvertToOMElement.size() " + lstToConvertToOMElement.size());

				OMElement omLstElement = org.apache.axis2.databinding.utils.BeanUtil.getOMElement(qnameList,
																								  new QName("SdmTableColumn"),
																								  new TypeTable());

				if(omLstElement != null){
					System.out.println(" OMElement is obtained. omLstElement ");

				List objListType = (List)BeanUtil.processObject(omLstElement, java.util.ArrayList.class,
null, true, new DefaultObjectSupplier());
				if(objListType instanceof List){
					System.out.println(" Yessssssssssssssssssssssss got the List object back" );
					List lstDeserialized = (List)objListType;
					System.out.println(" lstDeserialized.size() " + lstDeserialized.size());
					java.util.Iterator itrList = lstDeserialized.iterator();
							Object obj =;
							System.out.println(" Yessssssssssssssssssssssss got the object back from the list "
+ obj);

The MySampleVO code is pasted below

import java.util.List;

public class MySampleVO implements Serializable {
	private String name;
	private String label;
	private String expressionString;
	private String type;
	private boolean marked;
	private String quantityType;
	private List units;
	private String format;
    public MySampleVO() {
        this (null, null, null, null, null, null, null);

    public MySampleVO(String name, String label, String expressionString,
                          String type, String quantityType, List units,
                          String format) { = name;
        this.label = label;
        this.expressionString = expressionString;
        this.type = type;
        this.quantityType = quantityType;
        this.units = units;
        this.format = format;

    public String getName() {
        return name;

    public String getLabel() {
        return label;

    public String getType() {
        return type;

    public String getExpressionString() {
        return expressionString;

    public List getUnits() {
        return units;

    public String getQuantityType() {
        return quantityType;

    public boolean isMarked() {
        return marked;

    public void setMarked(boolean marked) {
        this.marked = marked;

    public void setExpressionString(String expressionString) {
        this.expressionString = expressionString;

    public void setLabel(String label) {
        this.label = label;

    public void setName(String name) { = name;

    public void setType(String type) {
        this.type = type;

    public void setUnits(List units) {
        this.units = units;

    public void setQuantityType(String quantityType) {
        this.quantityType = quantityType;
    public String getFormat() {
        return format;

    public void setFormat(String format) {
        this.format = format;

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message