Created by: Chester Rieman on 07-03-2013 08:45:27 AM Trying to get a handle on what SOAP::Lite sends - I can do this with curl but was looking to use perl. This works: #!/usr/bin/perl -w BEGIN { $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0 } use strict; use warnings; use SOAP::Lite +trace => 'debug'; use Data:umper; use MIME::Base64; my $cucmip = "xxx.xxx.xxx.xxx"; my $axl_port = "8443"; my $user = "axluser"; my $password = "password"; my $axltoolkit = "AXLAPI.wsdl"; my $cm = new SOAP::Lite encodingStyle => '', uri => "$axltoolkit", proxy => "https://$cucmip:$axl_port/axl/" ; $cm = Login($cm,$user,$password); #axl request my $res = $cm->listUserByName(SOAP:ata->name("firstname" => "%"), SOAP:ata->name("lastname" => "%"), SOAP:ata->name("searchLimit" => "") ); unless ($res->fault) { print Dumper($res->valueof('//listUserByNameResponse/return')); } else { printjoin', ', "FAULTCODE: " . $res->faultcode, "FAULTSTRING: " . $res->faultstring; } ################################################ sub Login { $cm->transport->http_request->header ( 'Authorization' => 'Basic ' . encode_base64("$user:$password", '') ); return $cm; } ################################################## Which sends this: SOAPAction: "AXLAPI.wsdl#listUserByName" <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <listUserByName xmlns="AXLAPI.wsdl"> <firstname xsi:type="xsd:string">%</firstname> <lastname xsi:type="xsd:string">%</lastname> <searchLimit xsi:type="xsd:string" /></listUserByName> </soap:Body></soap:Envelope> And I get a good response- To get perfmon object/counters would I use: proxy => "https://$cucmip:$axl_port/perfmonservice Anyone have the correct syntax for this? Thanks
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: