11-03-2008 04:06 AM - edited 03-18-2019 09:55 PM
i Want to send SOAP Request to Presence Server to get the users availability status.Please help me to get the SOAP Request.i'm working in c#.
11-03-2008 07:07 AM
If you want to get presence status from CUPS you should use SIP protocol. SOAP is just for configuration.
--
regards,
PK
11-03-2008 09:00 PM
Please help me to get some samples to use SIP protocol for getting the presence status.
11-04-2008 05:56 AM
try this:
it should be enough :)
regards,
PK
11-04-2008 10:19 PM
i've gone through the document and i'm able to send SOAP request to CUPS using C#. But i'm not sure how to use SIMPLE in C#. following is the code i've used to send SOAP request to CUPS
using System;
using System.Xml;
using System.Text;
using System.IO;
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class WebServiceAccess
{
public WebServiceAccess()
{
string xmlfile;
xmlfile="" +
"
"
" + "
"
"
" " +
" " +
" ";
HttpSOAPRequest(xmlfile,null);
}
public void HttpSOAPRequest(String xmlfile, string proxy)
{
byte[] bytes = null;
System.Net.ServicePointManager.ServerCertificateValidationCallback +=
delegate(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate,
System.Security.Cryptography.X509Certificates.X509Chain chain,
System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
return true;
};
HttpWebRequest req = (HttpWebRequest)WebRequest.Create("https://10.75.1.60:8443/EPASSoap/service");
req.Headers.Add("SOAPAction","\"\"");
req.ContentType = "text/xml;charset=\"utf-8\"";
req.Accept = "text/xml";
req.Method = "find_business";
// Add the network credentials to the request.
Console.WriteLine("Step 1");
// Encode the body using UTF-8.
bytes = Encoding.UTF8.GetBytes((string)xmlfile);
// Set the content header length. This must be
// done before writing data to the request stream.
req.ContentLength = bytes.Length;
Stream stm = req.GetRequestStream();
// Write the SQL query to the request stream.
stm.Write(bytes, 0, bytes.Length);
Console.WriteLine("Step 2");
stm.Close();
WebResponse resp= (HttpWebResponse)req.GetResponse();
Console.WriteLine("Step 3");
stm = resp.GetResponseStream();
StreamReader r = new StreamReader(stm);
// process SOAP return doc here. For now, we'll just send the XML out to the browser ...
Console.WriteLine(r.ReadToEnd());
Console.WriteLine("Step 4");
}
public static void Main(string[] args)
{
new WebServiceAccess();
}
}
This code is working fine. Sameway how do we send request for getting the user availability? Please help me to get some samples on this.
11-05-2008 06:52 AM
SOAP is just for configuration.
You need to use SIP (SIMPLE) and subscribe contact:
During subscription CUPS server will send you information about yours contact presence on every change.
If you have no idea about SIP+c# look here:
http://www.codeproject.com/KB/cs/SIP_stack_with_SIP_proxy.aspx
regards,
PK
11-13-2008 05:12 AM
Hi again..i could not get what to enter in the application.. like settings/Registrations/gateway etc.. Please help me out to find some simple examples..
From CUAD, i need to access the CUPS and find out the status..there is an example in cisco wiki call presenceMonitor..but its not working for me..
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide