Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
GeneralRe: Speeding up DataGridView RowCount assignment Pin
Luc Pattyn28-Oct-08 0:31
sitebuilderLuc Pattyn28-Oct-08 0:31 
GeneralRe: Speeding up DataGridView RowCount assignment Pin
AndrusM28-Oct-08 3:30
AndrusM28-Oct-08 3:30 
Questionhow to make call to telephone in c# Pin
ramu20u27-Oct-08 9:21
ramu20u27-Oct-08 9:21 
AnswerRe: how to make call to telephone in c# Pin
MidwestLimey27-Oct-08 9:38
professionalMidwestLimey27-Oct-08 9:38 
AnswerRe: how to make call to telephone in c# Pin
PIEBALDconsult27-Oct-08 18:20
mvePIEBALDconsult27-Oct-08 18:20 
Questionproblem with creating a messagequeue Pin
prasadbuddhika27-Oct-08 9:10
prasadbuddhika27-Oct-08 9:10 
AnswerRe: problem with creating a messagequeue Pin
manfred.bjorlin27-Oct-08 9:14
manfred.bjorlin27-Oct-08 9:14 
QuestionProblems with deserialization of MessageQueue Message Pin
manfred.bjorlin27-Oct-08 9:04
manfred.bjorlin27-Oct-08 9:04 
I'm working on a project where my application (in .net) should communicate with a java-application through MSMQ. By using BinaryMessageFormatter the java application could not deserialize the message, but this worked fine when using XmlMessageFormatter.

The problem is that this java application posts back an XML to the message queue, but i can't read this in any way.

I have the following code:
1	using (MessageQueue mq = new MessageQueue(".\\testQueue")) 
2	{ 
3	  mq.Formatter = new XmlMessageFormatter(new Type[] { typeof(string), typeof(XmlDocument), typeof(XmlElement), typeof(XmlDataDocument), typeof(XmlNode) }); 
4	 
5	  using (Message msg = mq.Receive()) 
6	  { 
7	    try 
8	    { 
9	      object o = msg.Body; 
10	      Console.WriteLine(o as string); 
11	    } 
12	    catch (Exception ex) 
13	    { 
14	      Console.WriteLine("Error: " + ex.Message); 
15	    } 
16	    finally 
17	    { 
18	      Console.ReadKey(true); 
19	    } 
20	  } 
21	} 

I just get an error message "There is an error in XML document (2,1)". Is there any way to "read the raw content" of a message, or any other way to get the content of the message?

The XML in the incoming queue starts like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StatusSMSMessage xmlns="http://www........./specs/schemas/smsgw/StatusSMSMessage.xsd" mtMessageId="minimalMessage1"><DestinationAddress>


Do I have to implement message queuing from the Windows COM-library? In case; how to do this in .net?
AnswerRe: Problems with deserialization of MessageQueue Message Pin
Le centriste27-Oct-08 9:33
Le centriste27-Oct-08 9:33 
GeneralRe: Problems with deserialization of MessageQueue Message Pin
manfred.bjorlin28-Oct-08 0:01
manfred.bjorlin28-Oct-08 0:01 
GeneralRe: Problems with deserialization of MessageQueue Message Pin
Le centriste28-Oct-08 2:19
Le centriste28-Oct-08 2:19 
GeneralRe: Problems with deserialization of MessageQueue Message Pin
manfred.bjorlin28-Oct-08 2:29
manfred.bjorlin28-Oct-08 2:29 
QuestionBuilding a FAT emulator Pin
Gianpaolo Barci27-Oct-08 7:23
Gianpaolo Barci27-Oct-08 7:23 
AnswerRe: Building a FAT emulator Pin
Michael Bookatz27-Oct-08 7:32
Michael Bookatz27-Oct-08 7:32 
GeneralRe: Building a FAT emulator Pin
Gianpaolo Barci27-Oct-08 7:48
Gianpaolo Barci27-Oct-08 7:48 
GeneralRe: Building a FAT emulator Pin
User 665827-Oct-08 11:33
User 665827-Oct-08 11:33 
QuestionDeleting Items and Selecting next one on ListBox on C# Pin
three.leaf27-Oct-08 6:33
three.leaf27-Oct-08 6:33 
AnswerRe: Deleting Items and Selecting next one on ListBox on C# Pin
Parwej Ahamad27-Oct-08 7:25
professionalParwej Ahamad27-Oct-08 7:25 
AnswerRe: Deleting Items and Selecting next one on ListBox on C# Pin
Michael Bookatz27-Oct-08 7:30
Michael Bookatz27-Oct-08 7:30 
GeneralRe: Deleting Items and Selecting next one on ListBox on C# Pin
three.leaf27-Oct-08 10:36
three.leaf27-Oct-08 10:36 
AnswerRe: Deleting Items and Selecting next one on ListBox on C# Pin
#realJSOP27-Oct-08 9:16
mve#realJSOP27-Oct-08 9:16 
GeneralRe: Deleting Items and Selecting next one on ListBox on C# Pin
three.leaf27-Oct-08 17:08
three.leaf27-Oct-08 17:08 
GeneralRe: Deleting Items and Selecting next one on ListBox on C# Pin
#realJSOP28-Oct-08 0:26
mve#realJSOP28-Oct-08 0:26 
GeneralRe: Deleting Items and Selecting next one on ListBox on C# Pin
#realJSOP28-Oct-08 1:13
mve#realJSOP28-Oct-08 1:13 
QuestionHow to select multiple rows in a DataGrid? Pin
chicago7627-Oct-08 6:25
chicago7627-Oct-08 6:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.