Subject: how to connect to xmpp server
hello experts,
i want to build an application that will connect to xmpp server and allow users to do voice and text chat...
my first tasks is straight forward... i am using dotnet... how can i connect to xmpp.. i have installed openfire on my local network..192.168.0.58, i guess it works on 5222 port....
XML file
<iq to='chd-wrkstn-043'
type='set'
id='sess_1'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
i know i maybe completely wrong...but i cant find a wayout of this problem...
i want to build an application that will connect to xmpp server and allow users to do voice and text chat...
my first tasks is straight forward... i am using dotnet... how can i connect to xmpp.. i have installed openfire on my local network..192.168.0.58, i guess it works on 5222 port....
- protected void Page_Load(object sender, EventArgs e)
- {
- string uri = "http://chd-wrkstn-043:5222";
- string fileName = Server.MapPath("test.xml");
- WebRequest req = WebRequest.Create(uri);
- req.Method = "POST";
- req.ContentType = "text/xml";
- //req.ContentLength = 790;
- strw.Write(GetTextFromXMLFile(fileName));
- strw.Close();
- WebResponse resp = req.GetResponse();
- string a = sr.ReadToEnd().ToString();
- sr.Close();
- string str = resp.Headers.ToString();
- string ssd = resp.ResponseUri.ToString();
- }
- private string GetTextFromXMLFile(string file)
- {
- string ret = reader.ReadToEnd();
- reader.Close();
- return ret;
- }
XML file
<iq to='chd-wrkstn-043'
type='set'
id='sess_1'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
i know i maybe completely wrong...but i cant find a wayout of this problem...