XML Streaming over networks in C#

Discuss how to write good code, break bad code, your current pet projects, or the best way to approach novel problems

XML Streaming over networks in C#

Post by Casval on Thu Sep 04, 2008 12:00 pm
([msg=10884]see XML Streaming over networks in C#[/msg])

I'm making a battleship game that communicates with a server via XML streaming. The basics of the console are finished and all objects are ready, the only issue I'm having is communicating with the server via XML.

Simple strings respond with an error saying the text must be valid XML.
XML nodes respond with an error saying "all requests must have a valid request type"

I know it may seem a bit foolish to post about a server that no one else has access to, however general information about XML streaming in general would prove helpful.

p.s. google was no help
Casval
New User
New User
 
Posts: 24
Joined: Mon Apr 14, 2008 7:05 am
Blog: View Blog (0)


Re: XML Streaming over networks in C#

Post by BhaaL on Fri Sep 05, 2008 7:17 am
([msg=10916]see Re: XML Streaming over networks in C#[/msg])

I suppose you mean SOAP? Like, Webservice and Client?

If yes, SOAP defines exactly how the XML *must* look like; most IDEs also offer the possibility to create classes based on WSDL/XSD (Web Service Definition Language, some Standard thingy for Webservices). Use those if available.

If not, or if the Server is also an application written by you (not as WCF/Webservice), you may want to think of alternate ways of submitting Data (XML may be human raedable and all that, but not necessarily the most efficiant; especially for high-traffic stuff). If it has to be XML, look into XmlDocument or even XDocument for .Net 3.5, they allow XML Content Creation on a pretty nifty base, especially the 3.5 ones.
BhaaL
Poster
Poster
 
Posts: 270
Joined: Sun Apr 13, 2008 11:16 am
Blog: View Blog (0)



Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests