I am sorry, but somehow I just don't get it how to retrieve some data from the Array...
I try to get the data from get_pullgbdtableReturn_get_records_get_WSGbdRecord_get_tableRecord()
but run into the error "Can't call method "get_tableRecord" on unblessed reference at "
retrieving scalar data is working fine: get_pullgbdtableReturn_get_tableInfo_get_name
What did I forget, or doring wrong? Please can you give me a helping hand...
----------------------------------------------------------------------------------------------------
Output: from perldoc PA_GBDA_Elements::pullgbdtableResponse
----------------------------------------------------------------------------------------------------
print $element->get_pullgbdtableReturn();
{
pullgbdtableReturn => { # PA_GBDA_Types::WSGbdResult
tableInfo => { # PA_GBDA_Types::WSGbdTableInfo
name => $some_value, # string
structure => { # PA_GBDA_Types::ArrayOfWSGbdColumnInfo
WSGbdColumnInfo => { # PA_GBDA_Types::WSGbdColumnInfo
name => $some_value, # string
size => $some_value, # string
type => $some_value, # string
},
},
businesskey => $some_value, # string
},
headers => { # PA_GBDA_Types::ArrayOfWSGbdHeader
WSGbdHeader => { # PA_GBDA_Types::WSGbdHeader
name => $some_value, # string
columnTitles => $some_value, # string
},
},
records => { # PA_GBDA_Types::ArrayOfWSGbdRecord
WSGbdRecord => { # PA_GBDA_Types::WSGbdRecord
tableRecord => $some_value, # string
codeMappings => { # PA_GBDA_Types::ArrayOf_xsd_nillable_string
string => $some_value, # string
},
codeLabels => { # PA_GBDA_Types::ArrayOf_xsd_nillable_string
string => $some_value, # string
},
},
},
},
},
----------------------------------------------------------------------------------------------------
Perl-Program:
----------------------------------------------------------------------------------------------------
.
.
.
#
print $response->get_pullgbdtableReturn()->get_tableInfo->get_name ."\n";
print $response->get_pullgbdtableReturn()->get_tableInfo->get_businesskey ."\n";
#
print $response->get_pullgbdtableReturn()->get_records() . "\n" ;
print $response->get_pullgbdtableReturn()->get_records()->get_WSGbdRecord() . "\n" ;
print $response->get_pullgbdtableReturn()->get_records()->get_WSGbdRecord()->get_tableRecor
+d() . "\n" ;
#
use Data::Dumper ;
#print Dumper ( $response->get_pullgbdtableReturn()->get_records()->get_WSGbdRecord()->get_
+tableRecord() ) ;
my @gbda_table_records = $response->get_pullgbdtableReturn()->get_records()->get_WSGbdReco
+rd() ;
foreach $gbda_table_record (@gbda_table_records)
{
use Data::Dumper ;
print Dumper ( $gbda_table_record ) ;
#print $gbda_table_record . "\n" ;
# print Dumper $gbda_table_record->get_WSGbdRecord ;
# #print $gbda_table_records . "\n";
# #print "\n";
# #print defined( $gbda_table_record->get_WSGbdRecord(0) ) , "\n" ;
# #print $gbda_table_record->get_tableRecord() , "\n" ;
}
#
----------------------------------------------------------------------------------------------------
Output: from Perl Code:
----------------------------------------------------------------------------------------------------
gma021@cceulx044:/home/gma021/development/test > ./test_PA_GBDA_04.pl
country
countrycodea2|countrycodea3|countrycoden3
<WSGbdRecord xmlns=""><tableRecord>'986'</tableRecord><codeMappings xmlns=""></codeMappin
+gs><codeLabels xmlns=""></codeLabels></WSGbdRecord><WSGbdRecord xmlns=""><tableRecord>'MOO&ap
+os;</tableRecord><codeMappings xmlns=""></codeMappings><codeLabels xmlns=""></codeLabels></WSGbdRe
+cord><WSGbdRecord xmlns=""><tableRecord>'Moo'</tableRecord><codeMappings xmlns=""></code
+Mappings><codeLabels xmlns=""></codeLabels></WSGbdRecord><WSGbdRecord xmlns=""><tableRecord>'
+ada'</tableRecord><codeMappings xmlns=""></codeMappings><codeLabels xmlns=""></codeLabels></W
+SGbdRecord>
ARRAY(0x14d2af0)
Can't call method "get_tableRecord" on unblessed reference at ./test_PA_GBDA_04.pl line 102.
gma021@cceulx044:/home/gma021/development/test >
----------------------------------------------------------------------------------------------------