This document was generated from CDN thread
Created by: Konstantin Chrispens on 12-12-2011 10:57:30 AM
Hi all,
The method getExtMapStatus() in the class ISPhoneLineList returns one instance of ExtMapStatus. Shouldn't it return an array of ExtMapStatus instances for devices with multiple lines?
Subject: RE: ISPhoneLineList
Replied by: Yaw-Ming Chen on 12-12-2011 03:47:25 PM
Hope the following sample helps
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
Replied by: Konstantin Chrispens on 14-12-2011 04:10:26 AM
This doesn't work with version 1.0.2 because here getExtMapStatus() does not return a list but one single ExtMapStatus object. But it works in version 1.0.1
Subject: RE: ISPhoneLineList
Replied by: Raghavendra Gutty Veeranagappa on 14-12-2011 05:48:50 AM
Hi Konstantin,
it is changed In 1.0.2 , please use below code to get the same result.
for (ISDevice a : response.getISDevices().getISDevice()){
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());
}
Thanks,
Raghavendra
Subject: RE: ISPhoneLineList
Replied by: Frank Bodiker Jr on 11-12-2012 04:56:51 PM
Raghavendra,
Konstantin is correct. the definition is broken in 1.0.2
your codc example above is wrong, because only returns the first element, not all ExtMapStatus elements, as needed for all purposes.
However, including both 1.0,1 and 1.0.2 jarfiles, one can have it working.
Subject: RE: ISPhoneLineList
Replied by: Raghavendra Gutty Veeranagappa on 12-12-2012 04:59:31 AM
Hi Frank,
your correct above sample code return one element, i will check and let you know.
Thanks,
Raghavendra