CUCM 9.0 AXLAPIService.cs Exceptions

Version 1
    This document was generated from CDN thread

    Created by: Pradeep P V N on 07-12-2012 09:32:22 AM
    I am unable to add phone using addPhone as i am getting error "a character to numeric conversion process failed" while assining index attribute to XPhoneLine object. The generated AXLAPIService.cs for CUCM 9.0 is expecting string for the index attribute but the schema actually pointing to XInteger.
    Can anybody help in resolving the issue?
    C# Code Snippet which i am trying to execute:
    private string callAddPhone(AXLAPIService axlApiService) {                string str = string.Empty;         GetPhoneResReturn phoneres;                 try         {    GetPhoneReq getPhoneReq = new GetPhoneReq();   getPhoneReq.ItemElementName = ItemChoiceType136.name;   //Softphone Template   getPhoneReq.Item = "ipctemptest";   GetPhoneRes getResponse = axlApiService.getPhone(getPhoneReq);   phoneres = getResponse.@return;      AddPhoneReq addPhoneReq = new AddPhoneReq();             addPhoneReq.phone = new XPhone();      //Unique softphone name             addPhoneReq.phone.name = "ipc-XY23456789";             XFkType xfktype = new XFkType();             xfktype.uuid = phoneres.phone.phoneTemplateName.uuid;             addPhoneReq.phone.phoneTemplateName = xfktype;             XFkType xfktype1 = new XFkType();             xfktype1.Value = "abcxyz";             addPhoneReq.phone.ownerUserName = xfktype1;             addPhoneReq.phone.lines = new XPhoneLines();             addPhoneReq.phone.lines.Items = new XPhoneLine[1];             XPhoneLine line = new XPhoneLine();                        line.index = "5";             line.display = "Test User";             line.dirn = new XDirn();             line.dirn.pattern = "1234567899";             line.displayAscii = "Test User";             addPhoneReq.phone.lines.Items.SetValue(line, 0);             StandardResponse res2 = axlApiService.addPhone(addPhoneReq);             str = res2.@return;  }  return str; }
    I attached code file also with proper allignment.
    Thanks in advance.