Page 1 of 1

XML in messages getting converted issue

Posted: 08 May 2009, 05:40
by cBroadbo
Hi All,

I'm having an issue when I receive XML as a message on a .NET client from an iPhone client.

Message sent from iPhone
<node/>

Received on C# .NET client app:
Debug Message:
[ RECEIVED ]: <msg t='sys'><body action='pubMsg' r='1'><user id='7' /><txt><![CDATA[<node/>]]></txt></body></msg>, (len: 105)

Notice that the XML string has been converted within the CDATA block.

The message actually causes the C# app to disconnect:

Debug Message:
Disconnect due to: Index and length must refer to a location within the string.
Parameter name: length
Connection Lost


I can send the same XML message to/from a .NET client without issue.

We have a guy working with the Java client API and he is having the same issue sending from a Java client to .NET.

Is there a setting I'm missing, or is this a problem?

Thanks,
Craig

Posted: 08 May 2009, 18:24
by cemuzunlar
SmartfoxServer Server and Client API's put public messages into CDATA blocks in the sent XML messages because they are free from text and should not be parsed as XML.

There seems to be a problem with the C# client API.

Posted: 09 May 2009, 19:16
by ThomasLund
Ship me a PM with your email, and I will send you the upcomming 1.2.0 of the .NET API. I think this bug is fixed already there, so lets try to check!

Else I'll happily help on resolving the issue.

/Thomas