<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I can display above msg small script output to the screen using - 'print $msg; at the end but what I need to do is submit above perl request to Call manager 6?<br>
Any body can give me some help here <br><br>ie..<br><br>instead of print $msg outpout on the screen, I want the output to be submitted to the CCM server to logout SEPaabbccddee device using perl script.<br><br></blockquote>
</div>Hi,<br><br>I use the following code for various AXL API requests to the CCM. You will need net::ssleay perl package, LWP (Data::Dumper and XML::Simple are optional)<br><br>--- CUT ---<br>use LWP::UserAgent;<br>use Data::Dumper;<br>
use XML::Simple;<br><br>my $axlUser = 'username';<br>my $axlPwd = 'password';<br># this one is for ccm 4.2 Change this to the URL for ccm 6<br>my $ccmUrl = '<a href="https://CCMIP/CCMApi/AXL/V1/soapisapi.dll">https://CCMIP/CCMApi/AXL/V1/soapisapi.dll</a>';<br>
<br>my $soapEnv = <<AXL;<br><?xml version="1.0" encoding="utf-8"?><br><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" xmlns:SOAP-ENV="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>" xmlns:SOAP-ENC="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>"><br>
<SOAP-ENV:Body><br> <axl:getPhone xmlns:axl="<a href="http://www.cisco.com/AXL/1.0">http://www.cisco.com/AXL/1.0</a>"><br> <phoneName>SEP00233319A4E8</phoneName><br>
</axl:getPhone><br> </SOAP-ENV:Body><br></SOAP-ENV:Envelope><br>AXL<br><br># Create a user agent object<br>my $ua = LWP::UserAgent->new;<br><br># Create a request<br>my $req = HTTP::Request->new(POST => $ccmUrl);<br>
$req->content_type('text/xml');<br>$req->header('Accept' => 'text/*');<br>$req->content($soapEnv);<br>$req->authorization_basic($axlUser,$axlPwd);<br><br># Pass request to the user agent and get a response back<br>
my $res = $ua->request($req);<br><br># Check the outcome of the response<br>if ($res->{_rc} == 200) <br>{ <br> # Request was successful<br> $xml = new XML::Simple();<br> $data = $xml->XMLin($res->content,KeyAttr => "return" );<br>
print Dumper($data);<br>}<br>else<br>{<br> # Request failed<br>}<br>--- CUT ---<br><br clear="all"><br>-- <br>Aleksandar Topuzovic<br>Cisco Certified Network Professional<br>Cisco Certified Voice Professional<br>