You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by ji...@apache.org on 2004/04/09 15:34:43 UTC

[jira] Assigned: (SOAP-156) BeanSerializer : bug for indexed properties

Message:

   The following issue has been re-assigned.

   Assignee: Scott Nichol (mailto:snicholnews@scottnichol.com)
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/SOAP-156

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: SOAP-156
    Summary: BeanSerializer : bug for indexed properties
       Type: Bug

     Status: Open

    Project: Apache SOAP
 Components: 
             All
   Versions:
             2.3

   Assignee: Scott Nichol
   Reporter: Adrian

    Created: Thu, 30 Oct 2003 9:51 PM
    Updated: Fri, 9 Apr 2004 6:33 AM
Environment: Operating System: Other
Platform: Other

Description:
The class BeanSerializer throws a NullPointerException whenever it encouters a 
bean with indexed properties, like :

package tmp;

public class TestTO extends AnyType
{
  public TestTO()
  {
  }
	public void  setId (int i, String a) {
	}
	
	public String getId (int i) {
		return null;
	}
}

I'm working with WSAD 5.0.

It seems the error appears because propType is null for property id.
here's an extract of code from BeanSerializer :

      String propName = properties[i].getName();
      Class propType = properties[i].getPropertyType();

      // Serialize every property except the "class" property.
HERE ==>  if (!propType.equals(Class.class))



Here's a stack trace :
	STACK-TRACE : java.lang.NullPointerException
			java.lang.NullPointerException
			at 
org.apache.soap.encoding.soapenc.BeanSerializer.marshall(Unknown Source)
			at 
org.apache.soap.util.xml.XMLJavaMappingRegistry.marshall(Unknown Source)
			at 
org.apache.soap.encoding.soapenc.ArraySerializer.marshall(Unknown Source)
			at 
org.apache.soap.encoding.soapenc.ParameterSerializer.marshall(Unknown Source)
			at 
org.apache.soap.util.xml.XMLJavaMappingRegistry.marshall(Unknown Source)
			at 
org.apache.soap.encoding.soapenc.BeanSerializer.marshall(Unknown Source)
			at 
org.apache.soap.encoding.soapenc.ParameterSerializer.marshall(Unknown Source)
			at org.apache.soap.rpc.RPCMessage.marshall(Unknown 
Source)
			at org.apache.soap.Body.marshall(Unknown Source)
			at org.apache.soap.Envelope.marshall(Unknown Source)


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira