CUCM 8.5 Perl, SOAP::Lite and getLine

Version 1
    This document was generated from CDN thread

    Created by: Christopher Lamer on 10-08-2012 01:35:27 AM
    I'm having a heck of a time getting the getLine to work under 8.5.  I can get getPhone to work with the code just fine, but the getLine seems to have a <ns:getLine sequence="?"> sequence requirement and I can't figure out how to get that attribute in there with SOAP::Lite.
     
    This works must fine with getPhone:

    my $cm = SOAP::Lite
        -> encodingStyle('')
        -> on_action(sub { return "CUCMB ver=$ver" })
        -> proxy("https://$cucmip:$axl_port/axl/")
        -> uri("http://www.cisco.com/AXL/API/$ver");

      $cm->outputxml('true');

      my $method = SOAP:ata->name('getPhone')->attr({xmlns => 'http://www.cisco.com/AXL/API/8.5'});
      my @params = ( SOAP:ata->attr({xmlns => ''})->name("name" => "SEP0123456789AB"));
      my $res = $cm->call($method => @params);
     
    But with the getLine in it:
     
      my $method = SOAP:ata->name('getLine')->attr({xmlns => 'http://www.cisco.com/AXL/API/8.5'});
      my @params = ( SOAP:ata->attr({xmlns => ''})->name("pattern" => "59641"));
      my $res = $cm->call($method => @params);
     
    I get:
     
    SOAP::Transport::HTTP::Client::send_receive: POST https://172.24.254.70:8443/axl/ HTTP/1.1
    Accept: text/xml
    Accept: multipart/*
    Accept: application/soap
    Content-Length: 358
    Content-Type: text/xml; charset=utf-8
    SOAPAction: CUCMB ver=8.5

    <?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><getLine xmlns="http://www.cisco.com/AXL/API/8.5"><pattern xmlns="" xsi:type="xsd:int">59641</pattern></getLine></soap:Body></soap:Envelope>
    SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error

    <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>Item not valid: The specified Line was not found</faultstring><detail><axlError><axlcode>5007</axlcode><axlmessage>Item not valid: The specified Line was not found</axlmessage><request>getLine</request></axlError></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
    $VAR1 = {
      'soapenv:Body' => {
        'soapenv:Fault' => {
          'detail' => {
            'axlError' => {
              'request' => 'getLine',
              'axlcode' => '5007',
              'axlmessage' => 'Item not valid: The specified Line was not found'
            }
          },
          'faultcode' => 'soapenv:Server',
          'faultstring' => 'Item not valid: The specified Line was not found'
        }
      },
      'xmlns:soapenv' => 'http://schemas.xmlsoap.org/soap/envelope/'
     
    Ideas?
     
    Thanks!

    Subject: RE: CUCM 8.5 Perl, SOAP::Lite and getLine
    Replied by: Florian Kroessbacher on 10-08-2012 04:46:05 PM
    Hy,

    i think u have forgoten something for the line.

    Try to set either
    the uuid of the line
    or
    the pattern and the partition

    i think then it would work