Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Oleg Melikhov on 14-07-2011 04:23:08 PM a.getISPhoneLineList().getExtMapStatus() doesn't return List and not iterable. I'm using 1.0.2 sdk and didn't test with previous one.
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Oleg Melikhov on 14-07-2011 04:40:37 PM Correct. This document was generated from CDN thread
Created by: Oleg Melikhov on 14-07-2011 03:52:02 PM In Java docs this method declared to return java.util.List, but returns ExtMapStatus for last extension instead. If phone has more than one extension, no way to get all of them.
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Yaw-Ming Chen on 14-07-2011 04:00:17 PM Try something like this
for (ISDevice a : response.getISDevices().getISDevice()){ for (ExtMapStatus b: a.getISPhoneLineList().getExtMapStatus() ){ System.out.println( "Ext ID: "+b.getExtId()+" "+ "Ext Number: "+b.getExtNumber()+" "+ "Ext Status: "+b.getExtStatus()+" "+ "Ext ID: "+b.getLineId()+" "+ "Line State : "+b.getLineState()); } }
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Yaw-Ming Chen on 14-07-2011 04:36:15 PM I see, you mean single phone configured multiple ext numbers right ?
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Yaw-Ming Chen on 14-07-2011 05:35:47 PM Maybe try iterating through the list -- getISPhoneLineList() -- and do getExtMapStatus()
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Oleg Melikhov on 14-07-2011 06:54:44 PM Exaclly what I'm trying to point out: getISPhoneLineList() doesn't return java.util.List as documented. Return object is not iterable. The same problem with ISDevLineButtons.getISDevLineButton(). Return ISDevLineButton instead of list of ISDevLineButton. It's a bug in sdk.
Are you planing to fix it?
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Yaw-Ming Chen on 14-07-2011 07:19:32 PM So it's working for me. Please let me know the source of SDK file where you downloaded so I can use the same version to test
code:
response = cme_http.getAllDevice(); for (ISDevice a : response.getISDevices().getISDevice()){ for (ExtMapStatus b: a.getISPhoneLineList().getExtMapStatus() ){ System.out.println( "Ext ID = "+b.getExtId()+" "+ "Ext Number = "+b.getExtNumber()+" "+ "Ext Status = "+b.getExtStatus()+" "+ "Line ID = "+b.getLineId()+" "+ "Line State = "+b.getLineState()); } System.out.println("\nCDN test ++++++"+ a.getISPhoneLineList() +"+++++++"); }
output:
CDN test ++++++com.cisco.cme.xml.xsd.ISPhoneLineList@79a93f38+++++++ <---- first has two ext 1001 and 1002
CDN test ++++++com.cisco.cme.xml.xsd.ISPhoneLineList@5675b3ee+++++++ Ext ID = 1 Ext Number = 1001 Ext Status = true Line ID = 1 Line State = idle Ext ID = 2 Ext Number = 1002 Ext Status = true Line ID = 2 Line State = idle
CDN test ++++++com.cisco.cme.xml.xsd.ISPhoneLineList@4977fa9a+++++++ Ext ID = 2 Ext Number = 1002 Ext Status = true Line ID = 1 Line State = idle
CDN test ++++++com.cisco.cme.xml.xsd.ISPhoneLineList@63e5ba24+++++++ Ext ID = 3 Ext Number = 1003 Ext Status = true Line ID = 1 Line State = idle
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Oleg Melikhov on 14-07-2011 07:33:58 PM I'm using this jar cucmesdk-1.0.2.jar Downloaded from here http://developer.cisco.com/web/ucxapi/resources
Thanks
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Raghavendra Gutty Veeranagappa on 15-07-2011 02:53:05 AM Hi Oleg,
1.0.0 , 1.0.1 SDK''s returns List for getISPhoneLineList().getExtMapStatus() may be you can try those .
Thanks, Raghavendra
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Oleg Melikhov on 15-07-2011 11:40:12 AM Ok, Thanks.
Subject: RE: ISPhoneLineList.getExtMapStatus() doesn't return List Replied by: Yaw-Ming Chen on 15-07-2011 11:31:11 AM This is to confirm that I did see the same issue. Please use 1.0.1 for now
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: