[cisco-voip] AXL VB Examples

Matthew J. Hughes mattjhughes at gmail.com
Mon Aug 4 14:20:15 EDT 2008


Here is code that works for me. it does have to point to the HTTPS and since
most of us dont have a signed Cert for there servers, you should use the
"Ignore Cert error"  constant  as listed below. Replace the auth strings and
CCM url, and your set.



<%
  Response.Buffer = True
  Dim objXMLHTTP, xml
const SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056

  ' Create an xmlhttp object:
  'Set xml = Server.CreateObject("Microsoft.XMLHTTP")
  ' Or, for version 3.0 of XMLHTTP, use:
   Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
    xml.setOption 2, SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS

  ' Opens the connection to the remote server.
soaprequest = "<SOAP-ENV:Envelope xmlns:SOAP-ENV='
http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='
http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='
http://www.w3.org/2001/XMLSchema'><SOAP-ENV:Body><axl:listPhoneByName
xsi:schemaLocation='http://www.cisco.com/AXL/1.0
http://ccmserver/schema/axlsoap.xsd ' sequence='1234' xmlns:axl='
http://www.cisco.com/AXL/1.0
'><searchString>%</searchString></axl:listPhoneByName></SOAP-ENV:Body></SOAP-ENV:Envelope>"


  xml.Open "POST", "https://CCMADDRESS:8443/axl/", False,
"username","password"

  'Add Proper Headers
  xml.setRequestHeader "Authorization", "Basic
Y2KJSDFLKJLKJLKJ#JLSJKDLJSKDBuZw=="
  xml.setRequestHeader "Content-type", "text/xml"
  xml.setRequestHeader "POST", "8443/axl"
  xml.setRequestHeader "Content-length", "478"

  ' Actually Sends the request and returns the data:
  xml.Send soaprequest

  'Display the HTML both as HTML and as text



 // Response.Write xml.responseText

set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.loadXML(xml.responseText)
Set objLst = xmlDoc.getElementsByTagName("name")



for each x in objLst
//Response.Write "<b>" & x.nodename & "</b>"
Response.Write "<a href='http://mattdev.delta.test/examplegetIP.asp?name=" +
x.text + "'>"
Response.Write x.text
Response.Write "</a><br>"
next


  Set xml = Nothing
%>




>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20080804/4c8e0466/attachment.html>


More information about the cisco-voip mailing list