XML in messages getting converted issue

Post here all your questions related with the SmartFoxServer iPhone API

Moderators: Lapo, Bax

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

XML in messages getting converted issue

Postby cBroadbo » 08 May 2009, 05:40

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[&lt;node/&gt;]]></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
User avatar
cemuzunlar
Posts: 47
Joined: 26 Dec 2008, 00:45
Contact:

Postby cemuzunlar » 08 May 2009, 18:24

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

Postby ThomasLund » 09 May 2009, 19:16

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

Return to “iPhone Objective-C API”

Who is online

Users browsing this forum: No registered users and 20 guests