You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2013/07/26 15:19:48 UTC

[jira] [Updated] (AMQNET-440) IObjectMessage.ToObject is not working

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

Timothy Bish updated AMQNET-440:
--------------------------------

    Description: 
IObjectMessage.ToObject<T> is not working to achieve deserialization.
The code sample:

{code}
protected static void OnMessage(IMessage receivedMsg)
{
    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;

    //Following code is working
    IEmployee iEmp = objMessage.Body as IEmployee;//This code only is working
}

{code}

  was:
IObjectMessage.ToObject<T> is not working to achieve deserialization.
The code sample:
 protected static void OnMessage(IMessage receivedMsg)
        {
            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;

            //Following code is working
            IEmployee iEmp = objMessage.Body as IEmployee;//This code only is working
        }



    
> IObjectMessage.ToObject<T> is not working
> -----------------------------------------
>
>                 Key: AMQNET-440
>                 URL: https://issues.apache.org/jira/browse/AMQNET-440
>             Project: ActiveMQ .Net
>          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:
> {code}
> protected static void OnMessage(IMessage receivedMsg)
> {
>     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;
>     //Following code is working
>     IEmployee iEmp = objMessage.Body as IEmployee;//This code only is working
> }
> {code}

--
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