Problems Trying to Update SIP Trunk via AXL using Perl

Version 1
    This document was generated from CDN thread

    Created by: James Wagner on 02-02-2012 03:53:15 PM
    I have an off-site Asterisk server configured to interface with CUCM 8.5 via a SIP trunk over a VPN.  The router is unable to provide the same IP when the VPN is established, so I have to do some work in order to get CUCM to see Asterisk consistently.
     
    I've written a couple of perl scripts that will update the CUCM whenever the address of the Asterisk server changes.  The remote will wait until the VPN is active, retrieve the IP assigned to it, then send this address to a unix server at the primary location.  That server then connects to the CUCM and updates the Call Manager server.  They worked great in 4.x, but the data access is completely different in 8.5 (AXL instead of SQL, along a with VERY different database structure).  While I'm quite comfortable in SQL and perl, AXL and SOAP are very new to me; first time I've used either was when I started trying to update the script for this project.
     
    What I'm trying to do is to update the destination in the SIP trunk via a perl script.  So far, I've been unable to use either the getSipTrunk or updateSipTrunk calls.  I know that the problem is with the call itself and not the script/SOAP module, as I've been able to access AXL using a couple of different calls.  The error messages returned are such that they're next to useless; searching has found little of help.
     
    The script:
     
    #!/usr/bin/perl

    use warnings;
    use strict;
    use SOAP::Lite +trace => 'debug';
    use Data:umper;

    my $cucmip = "<ip>";
    my $axl_port = "<port>";
    my $user = "<user>";
    my $password = "<pass>";
    my $axltoolkit = "AXLAPI.wsdl";

    BEGIN {
      sub SOAP::Transport::HTTP::Client::get_basic_credentials {
        return ($user => $password)
      };
    }

    my $cm = new SOAP::Lite
        encodingStyle => '',
        uri => "$axltoolkit",
        proxy => "https://$cucmip:$axl_port/axl/" ;

    #Works to find line
    #my $res = $cm->getLine(SOAP:ata->name('uuid' => '83ebfc6c-e84e-7f97-62d5-0db38f9eda22'));
     
    #Works to update line
    #my $res = $cm->updateLine(SOAP:ata->name('uuid' => '83ebfc6c-e84e-7f97-62d5-0db38f9eda22'),
    #  SOAP:ata->value(
    #    SOAP:ata->name('callForwardAll' =>
    #      \SOAP:ata->value(
    #        SOAP:ata->name('forwardToVoiceMail' => 'f'),
    #        SOAP:ata->name('destination' => '3402')
    #      )
    #    ),
    #  SOAP:ata->name('alertingName' => 'whatever4')
    #  )
    #);
     
    #None of these, plus about 50 permutations, work
    #my $res = $cm->getSipTrunk(SOAP:ata->name('uuid' => 'a4ea21e2-8a37-b711-ea7f-50160ad0444c'));
     
    #my $res = $cm->getSipTrunk(SOAP:ata->name('NameAndGUIDRequest' =>
    #      \SOAP:ata->name('name' => 'TrunkName', \SOAP:ata->name('uuid' => 'a4ea21e2-8a37-b711-ea7f-50160ad0444c'))
    #    )
    #  );
     
    #my $res = $cm->getSipTrunk(SOAP:ata->name('uuid' => '{a4ea21e2-8a37-b711-ea7f-50160ad0444c}'));
     
    #my $res = $cm->getSipTrunk(SOAP:ata->attr({xmlns => 'http://www.cisco.com/AXL/API/8.5'})->name('uuid' => 'a4ea21e2-8a37-b711-ea7f-50160ad0444c'));
     
    #my $res = $cm->getSipTrunk(SOAP:ata->name('uuid' => 'a4ea21e2-8a37-b711-ea7f-50160ad0444c'));
     
    #my $res = $cm->getSipTrunk(SOAP:ata->name('name' => 'TrunkName'),
    #    SOAP:ata->name(uuid => 'a4ea21e2-8a37-b711-ea7f-50160ad0444c'));

    unless ($res->fault)
      {
      print Dumper($res->paramsall());
      print "\n";
      }
    else
      {
      print "FAILED!\n";
      print join ', ',
      $res->faultcode,
      $res->faultstring;
      }
     
     
     
    The error output from the getSipTrunk calls, no matter which one I use, is:
     
    SOAP-ENV:Client, schema_reference.4: Failed to read schema document '/usr/local/thirdparty/jakarta-tomcat/webapps/axl/schema/6.1/SoapEnvelope.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
     
     
    I find this message interesting since I'm using CUCM 8.5.  I've found other posts with different ways of constructing the SOAP object, some of which specify the version and some of which do not.  Regardless, nothing I've done thus far has resulted in anything other than the above error message when trying to use the *SipTrunk APIs.
     
    My best guess is that the AXL API lists NameAndGUIDRequest as the expected structure for getSipTrunk (which shows as requiring BOTH name and the uuid of the trunk), but nothing I do seems to make any difference to the result - the error message is the same every single time.  I can make the XML look however the server expects it to, but the problem is that I don't know what it expects and haven't found anything that really shows the expected format.  The error doesn't tell me anything about what's actually wrong and viewing the traces in RTMT doesn't reveal anything useful either.
     
    I've been working on this for most of a week and feel I've hit a brick wall as nothing I've done or learned has had any effect whatsoever.  (I figured it'd be 15 minutes to create a perl script which did something like updateSipTrunk(set destinationaddress='newip' where uuid='blah') and be done with it.  Heh, one week later... ;) )  Right now, I've been looking at this for so long, my mind is starting to spin around inside my skull.
     
    I'd appreciate any help or pointers.