XML in messages getting converted issue

Post here all your questions related with the SmartFoxServer iPhone API

Moderators: Lapo, Bax

Post Reply
cBroadbo
Posts: 20
Joined: 16 Apr 2009, 17:49

XML in messages getting converted issue

Post 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
cemuzunlar
Posts: 47
Joined: 26 Dec 2008, 00:45
Contact:

Post 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.
Cem Uzunlar
Infosfer Game and Visualization Technologies
http://www.infosfer.com
contact@infosfer.com
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

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