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 "Ted Jones (JIRA)" <ji...@apache.org> on 2007/02/13 15:00:35 UTC

[jira] Updated: (AXIS2-2054) Problem Serializing Sets

     [ https://issues.apache.org/jira/browse/AXIS2-2054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Jones updated AXIS2-2054:
-----------------------------

    Attachment: BeanUtil.java

 Able to resolve this issue with a minor change to the 
 getPullParser(Object, QName, TypeTable, boolean) method of 
 org.apache.axis2.databinding.utils.BeanUtils.
  
 Changed:
  
 jam_service_parms.addClassLoader(beanObject.getClass().getClassLoader( ));
 
 to:
  
 ClassLoader cl = beanObject.getClass().getClassLoader();
 if (cl!=null){
     jam_service_parms.addClassLoader(cl);
 }else{
     jam_service_parms.addClassLoader(Thread.currentThread().getContextClas sLoader());
 }


> Problem Serializing Sets
> ------------------------
>
>                 Key: AXIS2-2054
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2054
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>         Environment: Tomcat 5.0, Apache axis2-1.1, JDK1.5.0, XP
>            Reporter: Raja Chattopadhyay
>         Assigned To: Deepal Jayasinghe
>         Attachments: BeanUtil.java, TestService.zip
>
>
> I am trying to set java.util.Set in a Java Bean in my web service. After setting the bean, I am trying to return the bean as return type.
> Doing so I am facing an Exception like:
> Jan 27, 2007 10:15:02 AM
> org.apache.axis2.rpc.receivers.RPCMessageReceiver invokeBusinessLogic
> SEVERE: Exception occurred while trying to invoke service 
> method getAdrresses org.apache.axiom.om.OMException:
> java.lang.IllegalArgumentException: null rcl
> at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java
> To re-create the problem:
>  create a bean like
> ---------------------------------
>                   public class SampleBean{
>                                     Set set;
>                                     
>                                     public void setData(Set set){
>                                       this.set = set;
>                                     }
>                                     public Set getData(){
>                                       return set;
>                                     }
>                  }
>  Create a Service Class
> ------------------------------
>     public class TestService{
>                public SampleBean getAddress(){
>                Set set = new HashSet();
>                set.add("r1");
>                set.add("r2");
>                SampleBean sampleBean = new SampleBean();
>                sampleBean.setData(set);
>                return sampleBean;
>                }
>  }
> Invoke this Service using RPCMessageReceiver.

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org