How do I pick up a response from an MSMQ?

I want to read the body of the message from MSMQ sent from JDE Enterprise One.  I have no idea what XmlMessageFormatter is.  How do I read the unknown formatter message body from MSMQ?  I tried "System.String".  It didn't work.

I am able to get the message from the queue just fine, and read the message id, but how do I read the body/contents of the message.

There is an error message of:
Cannot deserialize the message passed as an argument. Cannot recognize the serialization format.
on line:
strMsg = msg.Body.ToString
Dim strQueuePath As String = ".\private$\mytestqueue"        
        Dim q As New MessageQueue(strQueuePath)
        Dim msg As New System.Messaging.Message
        Dim strFormatter As New System.Messaging.XmlMessageFormatter(New String() {"System.String"})
                
        msg = q.Peek
 
        msg.Formatter = strFormatter
        Dim strMsg As String = ""            
          
        strMsg = msg.Body.ToString

Open in new window

swoveland21Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DhaestCommented:
Take a look at the following articles. They should help you further

Programming MSMQ in .NET - Part 1
http://www.codeproject.com/KB/dotnet/mgrmsmq.aspx

Using MSMQ in Dot Net Using VB.Net Sending and Receiving Messages Using MSMQ in Dot Net:
http://www.aspfree.com/c/a/ASP.NET/Using-MSMQ-in-Dot-Net-Using-VBNet-Sending-and-Receiving-Messages-Using-MSMQ-in-Dot-Net/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
swoveland21Author Commented:
Thanks for the post
0
DhaestCommented:
Did you find the solution with the links ?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.