[cisco-voip] AXL VB Examples
Philip Walenta
pwalenta at wi.rr.com
Mon Aug 4 06:59:47 EDT 2008
If memory serves SOAP/AXL on 4.2 and higher requires using https and you
need do have the CUCM certificate on the machine doing the transaction.
This means your authorization method settings need to be changed.
I've attached some Java code I wrote a few years ago that should help.
_____
From: cisco-voip-bounces at puck.nether.net
[mailto:cisco-voip-bounces at puck.nether.net] On Behalf Of Granger, Simon
Sent: Monday, August 04, 2008 5:39 AM
To: cisco-voip at puck.nether.net
Subject: [cisco-voip] AXL VB Examples
Hello all,
I was wondering if anyone had any VB examples of AXL coding they can send
me.
I have seen that there has been talk on the site before, but am struggling
to get anything to work..
This is what I have so far but cannot get it to work at all.
'Build the SOAP payload
xmlsoap = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=" & chr(34) &
"http://schemas.xmlsoap.org/soap/envelope/" & chr(34)
xmlsoap = xmlsoap & "xmlns:xsi=" & chr(34) &
"http://www.w3.org/2001/XMLSchema-instance" & chr(34)
xmlsoap = xmlsoap & "xmlns:xsd=" & chr(34) &
"http://www.w3.org/2001/XMLSchema" & chr(34) & ">" & vbcrlf
xmlsoap = xmlsoap & "<SOAP-ENV:Body>" & vbcrlf
xmlsoap = xmlsoap & "<axl:getPhone xmlns:axl=" & chr(34) &
"http://www.cisco.com/AXL/1.0" & chr(34) & " "
xmlsoap = xmlsoap & "xsi:schemaLocation=" & chr(34) &
"http://www.cisco.com/AXL/1.0 http://10.216.4.11/schema/axlsoap.xsd" &
chr(34) & "sequence=" & chr(34) & "1234" & chr(34) & ">"
xmlsoap = xmlsoap & "<phoneName>SEP222222222245</phoneName>"
xmlsoap = xmlsoap & "</axl:getPhone>" & vbcrlf
xmlsoap = xmlsoap & "</SOAP-ENV:Body>" & vbcrlf
xmlsoap = xmlsoap & "</SOAP-ENV:Envelope>"
msgbox xmlsoap
dim xmlhttp
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
'replace localhost with the server you would like to post to
const SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056
xmlhttp.setOption 2, SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS
xmlhttp.Open "POST","http://10.216.4.11:8443/axl/",false
xmlhttp.setRequestHeader "Authorization", "Basic " &
Base64Encode("CCMAdmin:ca11manager")
xmlhttp.setRequestHeader "Content-type", "text/xml"
xmlhttp.setRequestHeader "POST", "8443/axl"
xmlhttp.setRequestHeader "Content-length", len(xmlsoap) //<-- length
in characters
xmlhttp.send xmlsoap
xmlhttp.responsexml.xml
Thanks
Registered No. 755780 England
Registered Office: FM Insurance Company Limited
1 Windsor Dials, Windsor,
Berkshire, UK, SL4 1RS
Regulated by the Financial Services Authority.
VAT No. G.B.: 792 4276 02
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20080804/91030fde/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: axlforward.java
Type: text/java
Size: 6208 bytes
Desc: not available
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20080804/91030fde/attachment-0001.bin>
More information about the cisco-voip
mailing list