cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4338
Views
0
Helpful
15
Replies

Axl error code -1, message is null

erersultan
Level 1
Level 1

  Hello guys. My name is Yersultan and I am from Kazakhstan.
I wanted to create an application, which to register the IP phone in the Call Manager. For this, I use AXl programming.

The problem is that the Call Manager 8.6.1.20000-1 everything works
fine
. A version 8.6.2.20000-2, I can’t create Device-Phone using axl.

I generated AXLAPIService.cs from AXLAPI.wsdl and AXLSoap.xsd(version 8.5).


Here is my code:


public static string AddPhone(AXLAPIService axlApiService, string FIO, string MACaddress, string PhoneNumber, string product)
    {
        string errMsg = "";
        try
        {

            AddPhoneReq addPhoneReq = new AddPhoneReq();
            addPhoneReq.phone = new XPhone();
            addPhoneReq.phone.name = "SEP170000100002";
            addPhoneReq.phone.product = "Cisco 3905";
            addPhoneReq.phone.@class = "Phone";
            addPhoneReq.phone.protocol = "SIP";
            addPhoneReq.phone.protocolSide = "User";

            XFkType xfktype = new XFkType();
            xfktype.Value = "Default";
            addPhoneReq.phone.devicePoolName = xfktype;

            xfktype = new XFkType();
            xfktype.Value = "Standard Common Phone Profile";
            addPhoneReq.phone.commonPhoneConfigName = xfktype;

            xfktype = new XFkType();
            xfktype.Value = "Hub_None";
            addPhoneReq.phone.locationName = xfktype;

            addPhoneReq.phone.useTrustedRelayPoint = "Default";
           
            addPhoneReq.phone.lines = new XPhoneLines();
            addPhoneReq.phone.lines.Items = new XPhoneLine[1];
            XPhoneLine line = new XPhoneLine();
            line.index = "5";
            line.display = "Line1";
            //existing directory number
            line.dirn = new XDirn();
            line.dirn.pattern = "1002";
            xfktype = new XFkType();
            xfktype.Value = "pt_HQ_Reqular2";
            line.dirn.routePartitionName = xfktype;
            addPhoneReq.phone.lines.Items.SetValue(line, 0);           

            StandardResponse res2 = axlApiService.addPhone(addPhoneReq);     //      
        }
        catch (Exception err)
        {
            return err.Message;
        }
        return errMsg;
    }


What am I doing wrong? In advance, thanks!

15 Replies 15

david norman
Level 1
Level 1

I had the same issue when I was trying to add a line into CUCM 8.6.1. I also noticed the java.lang.NullPointerException in the RTMT AXL logs.

To fix this issue I went into the AXLAPIService.cs and changed the CUCM:DB from version 8.0 to version 7.0. I also changed the namespace to http://www.cisco.com/AXL/API/7.0

I have read that the 8.0 schema is a lot more particular on the namespaces. I couldn't find out how to fix the problem, just to bypass it I think.