Reputation: 1511
I have a c# server and a java client. Currently they pass plain text between each other using sockets. Now I want to change these sockets to communicate in XML. I can implement the java side, But i do not know how to implement the c# server side so that the server and the client could communicate without any problem. Are there any special technologies/libraries that I could use for this? at least a pointer to some examples is appreciated.
thanks
/Suralk
Upvotes: 1
Views: 1576
Reputation: 17367
You could do it with a web service (WCF in C#). Both Java and C# can read a WSDL.
http://msdn.microsoft.com/en-us/netframework/aa663324.aspx
http://teaching.cs.uml.edu/~heines/tools/JRun4/docs/html/Programmers_Guide/ws_wsdl5.html
Upvotes: 0
Reputation: 11499
Use XmlDocument to create XML. Then you can send the complete string of that XML (xmlDoc.OuterXml) using TcpClient. Then using TcpClient you can also wait for the response.
Upvotes: 1