hi all,
i have a lot of different types of Requests which provide response, i need to print a value that comes in the response
here are the two examples for the response that i get
args String[0] (id=18)
dr1 DataRetriever (id=20)
requests ArrayList<E> (id=23)
g1 RequestItemHolder (id=31)
g2 RequestItemHolder (id=33)
g3 RequestItemHolder (id=35)
cal GregorianCalendar (id=37)
response ArrayList<E> (id=39)
elementData Object[22] (id=42)
[0] NonPeriodicRequestItem (id=44)
[1] NonPeriodicRequestItem (id=47)
[2] NonPeriodicRequestItem (id=49)
[3] NonPeriodicRequestItem (id=50)
[4] NonPeriodicRequestItem (id=81)
[5] NonPeriodicRequestItem (id=51)
[6] FinancialRequestItem (id=52)
__equalsCalc null
__equalsCalc null
__equalsCalc null
__equalsCalc null
__equalsCalc null
__hashCodeCalc false
__hashCodeCalc false
__hashCodeCalc false
__hashCodeCalc false
__hashCodeCalc false
currencyConversionInfo CurrencyConversionInfo (id=82)
__equalsCalc null
__hashCodeCalc false
currencyConversionMode CurrencyConversionMode (id=90)
currencyId 0
filingMode FilingMode (id=84)
filterType FilterType (id=86)
formulaMetric FormulaMetric (id=88)
identifier CompanyIdentifier (id=92)
isConsolidated true
periodInfo PeriodInfo (id=96)
periodRangeInfo null
response FinancialResponseItem (id=98)
__equalsCalc null
__equalsCalc null
__equalsCalc null
__equalsCalc null
__hashCodeCalc false
__hashCodeCalc false
__hashCodeCalc false
__hashCodeCalc false
companyId 112350
currencyConversionModeId 0
error ErrorCode (id=107)
id 0
isConsolidated true
requestedCurrencyId 0
templateTypeId 1
tradingItemId 1
values FinancialDataValue[1] (id=109)
[0] FinancialDataValue (id=113)
__equalsCalc null
__equalsCalc null
__equalsCalc null
__hashCodeCalc false
__hashCodeCalc false
__hashCodeCalc false
_valueToReturn null
asOfDate GregorianCalendar (id=116)
auditabilityTypeId 1
calendarQuarter 4
calendarYear 2009
clickThroughTypeId ClickThroughType (id=117)
companyId 112350
conversionMode CurrencyConversionMode (id=90)
currencyConversionDate GregorianCalendar (id=119)
currencyId 160
dataItemId 28
dataTypeId DataType (id=120)
dataVendorId 1
delimiter "," (id=122)
endDate GregorianCalendar (id=124)
error ErrorCode (id=107)
filingDate GregorianCalendar (id=125)
financialDataSetID 1
fiscalQuarter 4
fiscalYear 2009
id 0
instanceId 1524809840
instanceTypeId 0
isEvaluated false
month 0
nonStandardLengthFlag false
periodDate GregorianCalendar (id=126)
periodId 1307330169
periodOffset -3
periodTypeId 1
reportedCurrencyId 160
scaleId Scale (id=127)
startDate GregorianCalendar (id=129)
subValueList null
unitsId Units (id=130)
valueAsString "95758.000000" (id=132)
valueId 0
restatementType RestatementType (id=103)
returnType ReturnType (id=105)
[7] FinancialRequestItem (id=55)
[8] RankRequestItem (id=57)
[9] DailyRequestItem (id=60)
[10] DailyRequestItem (id=63)
[11] EstimateRequestItem (id=64)
[12] EstimateRequestItem (id=67)
[13] EstimateMultipleRequestItem (id=69)
[14] EstimateMultipleRequestItem (id=71)
[15] EstimateMultipleRequestItem (id=74)
[16] EstimateMultipleRequestItem (id=75)
[17] KeyDevRequestItem (id=76)
[18] KeyDevRequestItem (id=2414)
[19] null
[20] null
[21] null
modCount 19
size 19


args String[0] (id=18)
requests ArrayList<E> (id=19)
dr1 DataRetriever (id=29)
g1 RequestItemHolder (id=31)
g2 RequestItemHolder (id=33)
g3 RequestItemHolder (id=34)
response ArrayList<E> (id=35)
elementData Object[10] (id=38)
[0] NonPeriodicRequestItem (id=40)
__equalsCalc null
__equalsCalc null
__equalsCalc null
__hashCodeCalc false
__hashCodeCalc false
__hashCodeCalc false
currencyConversionInfo CurrencyConversionInfo (id=49)
formulaMetric FormulaMetric (id=51)
identifier CompanyIdentifier (id=53)
response NonPeriodicResponseItem (id=57)
__equalsCalc null
__equalsCalc null
__equalsCalc null
__hashCodeCalc false
__hashCodeCalc false
__hashCodeCalc false
companyId 112350
currencyConversionModeId 0
error ErrorCode (id=63)
id 0
requestedCurrencyId 0
tradingItemId 2621697
values NonPeriodicDataValue[1] (id=65)
[0] NonPeriodicDataValue (id=69)
__equalsCalc null
__equalsCalc null
__hashCodeCalc false
__hashCodeCalc false
_valueToReturn null
auditabilityTypeId 0
clickThroughTypeId ClickThroughType (id=71)
companyId 0
conversionMode CurrencyConversionMode (id=73)
currencyConversionDate GregorianCalendar (id=75)
currencyId 0
dataItemId 0
dataTypeId DataType (id=79)
delimiter "," (id=81)
error ErrorCode (id=63)
id 0
instanceId 0
isEvaluated false
reportedCurrencyId 0
scaleId Scale (id=83)
subValueList null
unitsId Units (id=85)
valueAsString "CSP_459200101" (id=87)
valueId 0
returnType ReturnType (id=61)
[1] FinancialRequestItem (id=44)
[2] null
[3] null
[4] null
[5] null
[6] null
[7] null
[8] null
[9] null
modCount 2
size 2


here is the code to pull the value for responce 2
List<BaseRequestItem> res = dr1.GetFilledRequest(requests);
// for(BaseRequestItem b : res)
// {
// NonPeriodicResponseItem f = ((NonPeriodicRequestItem)b).getResponse();
// String value = ((NonPeriodicDataValue[])f.getValues())[0].getValueAsString();
// System.out.print(value);
// }

Is there anyway i can code it so that what ever my request is, i should get the value using one code only

currently i have to modify the response code based on the request to get the value

Please help