Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

AXL/SOAP Tool

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!!

1 REPLY
New Member

Re: AXL/SOAP Tool

If you know perl you can modify this script - I wrote it to log users out.

Use and

#!perl

use CGI;

use LWP::UserAgent;

use HTTP::Request::Common;

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="http://schemas.xmlsoap.org/soap/envelope/\"

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="".$line[0]."" ;

&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 "Lab CM\n";

print "

\n";

}

sub html_footer {

print "

}

sub close_file{

close(LOGIN);

}

"

139
Views
0
Helpful
1
Replies
CreatePlease login to create content