Click here to Skip to main content
15,921,837 members
Home / Discussions / C#
   

C#

 
AnswerRe: thread abort exception when service ends to where it has been invoked from Pin
Guffa27-Oct-08 15:48
Guffa27-Oct-08 15:48 
GeneralRe: thread abort exception when service ends to where it has been invoked from Pin
stephan_00727-Oct-08 23:29
stephan_00727-Oct-08 23:29 
QuestionSplitting up a list of things. Pin
Buckleyindahouse27-Oct-08 11:08
Buckleyindahouse27-Oct-08 11:08 
AnswerRe: Splitting up a list of things. Pin
Guffa27-Oct-08 11:19
Guffa27-Oct-08 11:19 
QuestionFormat The XML with Csharp Pin
zjaffary27-Oct-08 10:35
zjaffary27-Oct-08 10:35 
AnswerCross post and Repost Pin
led mike27-Oct-08 11:03
led mike27-Oct-08 11:03 
GeneralRe: Cross post and Repost Pin
Paul Conrad27-Oct-08 12:30
professionalPaul Conrad27-Oct-08 12:30 
QuestionSpeeding up DataGridView RowCount assignment Pin
AndrusM27-Oct-08 10:10
AndrusM27-Oct-08 10:10 
AnswerRe: Speeding up DataGridView RowCount assignment Pin
Wendelius27-Oct-08 10:23
mentorWendelius27-Oct-08 10:23 
GeneralRe: Speeding up DataGridView RowCount assignment Pin
AndrusM27-Oct-08 10:28
AndrusM27-Oct-08 10:28 
GeneralRe: Speeding up DataGridView RowCount assignment Pin
Wendelius27-Oct-08 10:49
mentorWendelius27-Oct-08 10:49 
GeneralRe: Speeding up DataGridView RowCount assignment Pin
AndrusM27-Oct-08 23:53
AndrusM27-Oct-08 23:53 
GeneralRe: Speeding up DataGridView RowCount assignment Pin
Luc Pattyn27-Oct-08 10:33
sitebuilderLuc Pattyn27-Oct-08 10:33 
GeneralRe: Speeding up DataGridView RowCount assignment Pin
AndrusM27-Oct-08 22:58
AndrusM27-Oct-08 22:58 
GeneralRe: Speeding up DataGridView RowCount assignment Pin
Luc Pattyn27-Oct-08 23:28
sitebuilderLuc Pattyn27-Oct-08 23:28 
GeneralRe: Speeding up DataGridView RowCount assignment Pin
AndrusM28-Oct-08 0:09
AndrusM28-Oct-08 0:09 
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 

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.