activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tamilmaran (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMQ-4653) IObjectMessage.ToObject<T> is not working
Date Fri, 26 Jul 2013 12:39:50 GMT

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

Tamilmaran updated AMQ-4653:
----------------------------

    Description: 
IObjectMessage.ToObject<T> is not working to achieve deserialization.
The code sample:
 protected static void OnMessage(IMessage receivedMsg)
        {
            IEmployee iEmp = null;
            objMessage = receivedMsg as IObjectMessage;

            //Following code is not working
            IEmployee emp = objMessage.ToObject<IEmployee>();

            //Following code is not working
            IEmployee emp1 = objMessage.ToObject() as IEmployee;
            
            if (objMessage != null)
            {                
                iEmp = objMessage.Body as IEmployee;//This code is working
            }
       }



  was:
IObjectMessage.ToObject<T> is not working to achieve deserialization.
The code sample:
 protected static void OnMessage(IMessage receivedMsg)
        {
            IEmployee iEmp = null;
            objMessage = receivedMsg as IObjectMessage;

            //Following code is not working
            IEmployee emp = objMessage.ToObject<IEmployee>();

            //Following code is not working
            IEmployee emp1 = objMessage.ToObject() as IEmployee;
            
            if (objMessage != null)
            {
                //Following code is working

                iEmp = objMessage.Body as IEmployee;
            }
       }



    
> IObjectMessage.ToObject<T> is not working
> -----------------------------------------
>
>                 Key: AMQ-4653
>                 URL: https://issues.apache.org/jira/browse/AMQ-4653
>             Project: ActiveMQ
>          Issue Type: Bug
>         Environment: activeMQ 5.8.0, C# API NMS 1.6.0
>            Reporter: Tamilmaran
>
> IObjectMessage.ToObject<T> is not working to achieve deserialization.
> The code sample:
>  protected static void OnMessage(IMessage receivedMsg)
>         {
>             IEmployee iEmp = null;
>             objMessage = receivedMsg as IObjectMessage;
>             //Following code is not working
>             IEmployee emp = objMessage.ToObject<IEmployee>();
>             //Following code is not working
>             IEmployee emp1 = objMessage.ToObject() as IEmployee;
>             
>             if (objMessage != null)
>             {                
>                 iEmp = objMessage.Body as IEmployee;//This code is working
>             }
>        }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message