You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Fabio Costa (JIRA)" <ji...@apache.org> on 2006/03/15 05:36:38 UTC
[jira] Created: (AXIS2-493) When using BeanUtil at the
RPCMessageReceiver(i.e.), axis2 gets NullPointerException using java styled
propert names such as contextType(setContextType/getContextType)
When using BeanUtil at the RPCMessageReceiver(i.e.), axis2 gets NullPointerException using java styled propert names such as contextType(setContextType/getContextType)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: AXIS2-493
URL: http://issues.apache.org/jira/browse/AXIS2-493
Project: Apache Axis 2.0 (Axis2)
Type: Bug
Components: databinding
Versions: 0.94
Environment: WinXP SP2 on Intel P-IV 1GB RAM, Jboss4.0.3SP1 + Tomcat 5.5, J2DK1.4.2_10, axis0.94
Reporter: Fabio Costa
Priority: Trivial
When you try to make a RPC call, at the class org.apache.axis2.databinding.utils.BeanUtil,
when deserializing the message context at the method
public static Object deserialize(Class beanClass, OMElement beanElement) throws AxisFault
(...)
It populates the properties HashMap with
properties.put(proprty.getName(), proprty); // at line 123
but, few lines below, it gets the localname from the message part and tries to find a property (from the properties hash) with that localname.
PropertyDescriptor prty = (PropertyDescriptor) properties.get(partsLocalName.toLowerCase()); //at line 134
The problem is that it performs a toLowerCase() onto the localname (string) passing it as the key to the hash but at line 123 it uses the "as is" property name (from the property descriptor).
So, if i.e. you use contextType (setContextType/getContextType) as the property name, it will never find it. You have to use contexttype (setContexttype/getContexttype) as the property name (not java style).
Well, i hope this will help you guys.
Keep up the excellent work!!!
See ya.
Fabio
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXIS2-493) When using BeanUtil at the
RPCMessageReceiver(i.e.), axis2 gets NullPointerException using java styled
propert names such as contextType(setContextType/getContextType)
Posted by "Fabio Costa (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-493?page=all ]
Fabio Costa updated AXIS2-493:
------------------------------
Attachment: src.zip
Sample classes
Mail.java
MailService.java
CallMailService.java (client using some different ways of calling the Mail Service)
service.xml
> When using BeanUtil at the RPCMessageReceiver(i.e.), axis2 gets NullPointerException using java styled propert names such as contextType(setContextType/getContextType)
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-493
> URL: http://issues.apache.org/jira/browse/AXIS2-493
> Project: Apache Axis 2.0 (Axis2)
> Type: Bug
> Components: databinding
> Versions: 0.94
> Environment: WinXP SP2 on Intel P-IV 1GB RAM, Jboss4.0.3SP1 + Tomcat 5.5, J2DK1.4.2_10, axis0.94
> Reporter: Fabio Costa
> Priority: Trivial
> Attachments: Mail.java, src.zip
>
> When you try to make a RPC call, at the class org.apache.axis2.databinding.utils.BeanUtil,
> when deserializing the message context at the method
> public static Object deserialize(Class beanClass, OMElement beanElement) throws AxisFault
> (...)
> It populates the properties HashMap with
> properties.put(proprty.getName(), proprty); // at line 123
> but, few lines below, it gets the localname from the message part and tries to find a property (from the properties hash) with that localname.
> PropertyDescriptor prty = (PropertyDescriptor) properties.get(partsLocalName.toLowerCase()); //at line 134
> The problem is that it performs a toLowerCase() onto the localname (string) passing it as the key to the hash but at line 123 it uses the "as is" property name (from the property descriptor).
> So, if i.e. you use contextType (setContextType/getContextType) as the property name, it will never find it. You have to use contexttype (setContexttype/getContexttype) as the property name (not java style).
> Well, i hope this will help you guys.
> Keep up the excellent work!!!
> See ya.
> Fabio
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (AXIS2-493) When using BeanUtil at the
RPCMessageReceiver(i.e.), axis2 gets NullPointerException using java styled
propert names such as contextType(setContextType/getContextType)
Posted by "Fabio Costa (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-493?page=all ]
Fabio Costa updated AXIS2-493:
------------------------------
Attachment: Mail.java
Mail class used by the issue I presented.
> When using BeanUtil at the RPCMessageReceiver(i.e.), axis2 gets NullPointerException using java styled propert names such as contextType(setContextType/getContextType)
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-493
> URL: http://issues.apache.org/jira/browse/AXIS2-493
> Project: Apache Axis 2.0 (Axis2)
> Type: Bug
> Components: databinding
> Versions: 0.94
> Environment: WinXP SP2 on Intel P-IV 1GB RAM, Jboss4.0.3SP1 + Tomcat 5.5, J2DK1.4.2_10, axis0.94
> Reporter: Fabio Costa
> Priority: Trivial
> Attachments: Mail.java
>
> When you try to make a RPC call, at the class org.apache.axis2.databinding.utils.BeanUtil,
> when deserializing the message context at the method
> public static Object deserialize(Class beanClass, OMElement beanElement) throws AxisFault
> (...)
> It populates the properties HashMap with
> properties.put(proprty.getName(), proprty); // at line 123
> but, few lines below, it gets the localname from the message part and tries to find a property (from the properties hash) with that localname.
> PropertyDescriptor prty = (PropertyDescriptor) properties.get(partsLocalName.toLowerCase()); //at line 134
> The problem is that it performs a toLowerCase() onto the localname (string) passing it as the key to the hash but at line 123 it uses the "as is" property name (from the property descriptor).
> So, if i.e. you use contextType (setContextType/getContextType) as the property name, it will never find it. You have to use contexttype (setContexttype/getContexttype) as the property name (not java style).
> Well, i hope this will help you guys.
> Keep up the excellent work!!!
> See ya.
> Fabio
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (AXIS2-493) When using BeanUtil at the
RPCMessageReceiver(i.e.), axis2 gets NullPointerException using java styled
propert names such as contextType(setContextType/getContextType)
Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/AXIS2-493?page=all ]
Deepal Jayasinghe resolved AXIS2-493:
-------------------------------------
Fix Version: 0.95
Resolution: Fixed
fixed , thx for finding this out
> When using BeanUtil at the RPCMessageReceiver(i.e.), axis2 gets NullPointerException using java styled propert names such as contextType(setContextType/getContextType)
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-493
> URL: http://issues.apache.org/jira/browse/AXIS2-493
> Project: Apache Axis 2.0 (Axis2)
> Type: Bug
> Components: databinding
> Versions: 0.94
> Environment: WinXP SP2 on Intel P-IV 1GB RAM, Jboss4.0.3SP1 + Tomcat 5.5, J2DK1.4.2_10, axis0.94
> Reporter: Fabio Costa
> Priority: Trivial
> Fix For: 0.95
> Attachments: Mail.java, src.zip
>
> When you try to make a RPC call, at the class org.apache.axis2.databinding.utils.BeanUtil,
> when deserializing the message context at the method
> public static Object deserialize(Class beanClass, OMElement beanElement) throws AxisFault
> (...)
> It populates the properties HashMap with
> properties.put(proprty.getName(), proprty); // at line 123
> but, few lines below, it gets the localname from the message part and tries to find a property (from the properties hash) with that localname.
> PropertyDescriptor prty = (PropertyDescriptor) properties.get(partsLocalName.toLowerCase()); //at line 134
> The problem is that it performs a toLowerCase() onto the localname (string) passing it as the key to the hash but at line 123 it uses the "as is" property name (from the property descriptor).
> So, if i.e. you use contextType (setContextType/getContextType) as the property name, it will never find it. You have to use contexttype (setContexttype/getContexttype) as the property name (not java style).
> Well, i hope this will help you guys.
> Keep up the excellent work!!!
> See ya.
> Fabio
--
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
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira