cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
774
Views
2
Helpful
3
Replies

Upgrade v8.5 to 10.5 (Add line to phone missing in UpdatePhoneReq)

Hi All,

I'm upgrading a v8.5 script to v10.5 and I used "UpdatePhoneReq" to assign the lines to the phone hardware.

But if I take a look at the v10.5 AXL the Lines attribute is removed from the "UpdatePhoneReq" class.

v8.5 method:

-------------------------------------------------------------------

UpdatePhoneReq phone

XPhoneLine[] phoneLineArray;

<fill the Phone object with details>

<fill the array with lines that have to be associated with the phone after the update>

XPhoneLines xphoneLines = new XPhoneLines();

xphoneLines.Items = phoneLineArray;

UpdatePhoneReqLines lines = new UpdatePhoneReqLines();

lines.Items = xphoneLines.Items;

phone.lines = lines;

-------------------------------------------------------------------

But in the v10.5 i'm getting:

-------------------------------------------------------------------

Error    2    'UpdatePhoneReq' does not contain a definition for 'lines' and no extension method 'lines' accepting a first argument of type 'UpdatePhoneReq' could be found (are you missing a using directive or an assembly reference?) 

-------------------------------------------------------------------

How can I add and remove lines if the phone objects already exists in v10.x?

Thanks in advance

Best regards

Floris

3 Replies 3

npetrele
Cisco Employee
Cisco Employee

Are you using Java?  UpdatePhoneReq has the two methods setAddLines(addLines) and setRemoveLines(removeLines) for adding and removing lines.  Is that what you're looking for?

Also, I would test the methods Nick is suggesting, if you have upgraded to 10.5, depending on which build you are you might have some issues with the removeLines tag.  If you do there is a fix, but test it first to make sure you can use it.

Also, if you use the "lines" tag on the updatePhoneReq you can accomplish the same functions as add and remove lines in a round about way.  What you would do is specify which lines you want on the phone you are updating.  If the lines you are specifying to update with do not already exist on the phone using the "lines" tag at the time of the request, they will be added.  If lines that are on the phone are not being specified under the "lines" tag, they will then be removed.  And obviously, any lines that are being specified by the "lines" tag that match lines on the phone, those will remain.

The other way to look at the "lines" tag usage compared to "addlines" and "removeLines" is that the "lines" usage will overwrite any lines settings on your phone no matter what is there previously. 

Let me know if I totally confused you or not. :-)

dkartio20
Level 1
Level 1

The documentation still shows <lines><line>...</line></lines>

Cisco AXL

I have found that the error messages returned don't always accurately indicate what the actually problem is with schema.  I have had several calls I have been upgrading from 7.1 and 9.1, that are now different in 10.5, and get a error message of "null" or "Error".  Sometimes the problem has been that the tag has been removed, or a new required tag is needed.  Even had times where the problem was that the camel-case spelling has changed