AXL Access in CME

Version 1
    This document was generated from CDN thread

    Created by: Eder Lopez on 29-09-2009 05:55:47 AM
    Hi,
     
    Im trying to communicate with CME through AXL/SOAP messages but im getting this error:
     
    The underlying connection was closed: The connection was closed unexpectedly.
     
    Im programming in C# and when the router is in debug mode I can see that is procesing some info but nothing happens, dont know if there is something with the headers or the router just dont like the soap message
     
    I have the next code in C#:
     
                string soaprequest = "";
                string url = "http://192.168.1.200/ISApi/AXL/V1/soapisapi.is";
                string response2 = "";

                soaprequest += "<SOAP-ENV:Envelope>\n";
                soaprequest += "<SOAP-ENV:Body>\n";
                soaprequest += "<axl >\n";
                soaprequest += "<request xsi:type=\"ISexecCLI\">\n";
                soaprequest += "<ISexecCLI>\n";
                soaprequest += "<CLI>ephone 1</CLI>\n";
                soaprequest += "<CLI>pin 1234</CLI>\n";
                soaprequest += "</ISexecCLI>\n";
                soaprequest += "</request>\n";
                soaprequest += "</axl>\n";
                soaprequest += "</SOAP-ENV:Body>\n";
                soaprequest += "</SOAP-ENV:Envelope>\ncontent='text/xml'";

                // build request objects to pass the data/xml to the server
                byte[] buffer = Encoding.ASCII.GetBytes(soaprequest);
                HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
                request.Credentials = new NetworkCredential("a", "cisco");

                request.Method = "POST";
                request.ContentType = "text/xml";
                request.Accept = "text/xml";
                request.ContentLength = buffer.Length;

                Stream post = request.GetRequestStream();

                post.Write(buffer, 0, buffer.Length);
                post.Close();

               
                HttpWebResponse response = request.GetResponse() as HttpWebResponse; <--- here is where i get the Error
               
                Stream responsedata = response.GetResponseStream();
                StreamReader responsereader = new StreamReader(responsedata);
                response2 = responsereader.ReadToEnd();
     
    Here is my router conf at the telephony section
     
    telephony-service
     xml user axluser password axlpass 15
     max-ephones 10
     max-dn 10
     ip source-address 192.168.1.200 port 2000
     auto assign 1 to 10
     max-conferences 4 gain -6
     call-forward pattern .T
     transfer-system full-consult
     transfer-pattern .T
     log table retain-timer 60
     log table max-size 100
     log password cisco
     xmltest
     
    I had integrated CME with UCCX before and it uses the xml user axluser password axlpass 15 line, dont know why with soap messages use the line  log password cisco.
     
    Ohh also the page http://192.168.1.200/ISApi/AXL/V1/soapisapi.is shows me a blank page, according to this forum post: http://forums.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Unified%20Communications%20and%20Video&topic=IP%20Phone%20Services%20for%20Developers&topicID=.ee94c94&fromOutline=&CommCmd=MB%3Fcmd%3Ddisplay_location%26location%3D.1de01a6e it has to show me some xml-test page, Ive already uploaded the cme gui and when I directly access the xml-test page I click in submit but nothing happens.
     
    Thanks in advance!!
     
    Eder.