02-22-2007 11:54 AM - edited 03-14-2019 08:10 PM
Does anyone know of an AXL/SOAP tools available. One of the things I want to be able to do is to import/configure multiple translation rules in CallManager. I have a customer who is looking at using around 700 short code dials!!
02-27-2007 11:57 AM
If you know perl you can modify this script - I wrote it to log users out.
Use
#!perl
use CGI;
use LWP::UserAgent;
use HTTP::Headers;
use SOAP::Lite;
use IO::File;
my $deviceName;
my $axlRequest;
my $file="test.csv";
my $axlType;
my $host;
my $soapHeader;
my $soapFooter;
open (LOGIN,$file) or die print "$file could not be opened $!";
$axlType="doDeviceLogout";
$host = 'x.x.x.x:80';
$soapHeader="
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
";$soapFooter=" ";
while (
my $data=$_;
my @line = split(/,/,$data);
chomp @line;
foreach ($data){
$deviceName="
&axlSend;
}
}
sub axlSend{
$axlRequest="<>http://www.cisco.com/AXL/1.0\" xsi:schemaLocation=\"http://www.cisco.com/AXL/1.0 http://gkar.cisco.com/schema/axlsoap.xsd\" sequence=\"10\">>
$deviceName
";
my $userAgent = LWP::UserAgent->new(agent => 'POST doDeviceLogout');
my $request="$soapHeader $axlRequest $soapFooter";
my $response = $userAgent->request(POST 'http://x.x.x.x/CCMApi/AXL/V1/soapisapi.dll',
Content_Type => 'text/xml',
Host => $host,
Authorization => 'Basic "base64Password"',
Content => $request);
#&html_header;
print $response->error_as_HTML unless $response->is_success;
$error=$response->as_string;
if (!$response->is_success){
print "Could not open connection to $host, $deviceName not logged off!";
}
elsif ($error=$response->as_string){
if ($error =~ /fault/){
print $response->error_as_HTML;
}
else { print "RESULT: logged out of $deviceName\n";
}
}
}
&close_file;
#&html_footer;
sub html_header {
print "Content-type: text/html\n\n";
print "
print "
" |
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