tom_13
16 years agoContributor
[SOLVED]Problem with HashMap in groovy
I need get HashMap from one script to another. I save it to the context in the first script :
Then get it in second script
My map has three levels and it is a problem, becouse if I show all map ( log.info curMap ) I receive
But if I write
or
I get NULL, I don't understend why it working so
Can anybody help me, I need to get map from second level
P.S I'm using soapUI 2.5.1
def map = new HashMap()
map [...] = ...
context.mapTestData = map
Then get it in second script
def curMap = new HashMap()
curMap = context.mapTestData
My map has three levels and it is a problem, becouse if I show all map ( log.info curMap ) I receive
Fri Oct 02 16:56:25 EEST 2009:INFO:{1={extra_parameter=null, ..., expexted=[{line_name=Line_Main, exp_charging=14}, {line_name=Common_Main, exp_charging=34}], ..., loc_area_ident=null}}
But if I write
log.info curMap[1]
or
log.info curMap['1']
I get NULL, I don't understend why it working so

Can anybody help me, I need to get map from second level
P.S I'm using soapUI 2.5.1