lvirden has asked for the wisdom of the Perl Monks concerning the following question:
The line 119 in the test script is:Uncaught exception from user code: 500 Too many header lines (limit is 128) Frontier::Client::call('Frontier::Client=HASH(0x13b608)', 'Get +AllByDept', 27) called at Misc/testuiv2.pl line 119
where $dept_no is 27. The method is pretty simple and works like the other methods already tested. When I run the sql statement used in the method directly against the database, it works without a problem. Here's the code in the method.$aresults = $server->call('GetAllByDept', $dept_no);
The web service methods all are using DBI and the CGI modules as well. The parameters for the DBI connection are set on entry to the program, and are being used by all the methods, so there is no difference there. The query itself only returns 27 rows, so I don't understand the reference to 128 headers. Has anyone any suggestions on what I might be able to do to fix it? Thank you very much.sub GetAllByDept{ my (@next_row); my @retval; #this will be array of arrays my $rc; my($SearchDept) = @_ or do { ERROR( "GetAllByDept: no argument provided" ); return \@retval; }; INFO( "GetAllByDept: $SearchDept passed" ); if ($SearchDept !~ /^\d+$/) { ERROR( "GetAllByDept: argument provided not a number" ); return \@retval; } #query db to find information my $dbconn = DBI->connect("DBI:Oracle:$DBHOST",$DBUSER,$DBPASS) or d +o { ERROR( "GetAllByDept: ORACLE connect failed - $DBI::errstr" ); + return \@retval; }; my $query = $dbconn->prepare( "Select * from $Schema.CSI_HR_V2 where DEPT_NO = ?") o +r do { ERROR( "GetAllByDept: ORACLE prepare failed - $DBI::errstr" ); $dbconn->disconnect(); return \@retval; }; DEBUG( "GetAllByDept: query = $query" ); $rc = $query->execute($SearchDept) or do { ERROR( "GetAllByDept: ORACLE execute failed for $SearchDept - +$DBI::errs tr" ); $query->finish; $dbconn->disconnect(); return \@retval; #problem return empty array }; my $count = 0; @next_row= $query->fetchrow_array(); while (@next_row) #get rows and add to return array of hashes { #get staff information $count++; push(@retval,{Alt_Emp_No => $next_row[0], Job_Class => $next_row[1 +], Title => $next_row[2],Dept_Code => $next_row[3], Dept_No => $next_row[4], Last_Name => $next_row[5],First_Name => $next_row[6], Middle_Name => $next_row[7], Supervisor_Emp_No => $next_row[8], Status => $next_row +[9], Suffix_Name => $next_row[10], Extension => $next_row +[11], Room_No => $next_row[12], Email => $next_row[13], Login => $next_row[14], Login_History => $next_row[1 +5], Contractor => $next_row[16], Create_Date => $next_row[17], Mod_Date => $next_row[18 +] }); @next_row= $query->fetchrow_array(); } INFO( "GetAllByDept: $count records found for $SearchDept"); $query->finish; $dbconn->disconnect(); return \@retval; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help sought determining why Frontier::Client reporting too many header lines
by sierpinski (Chaplain) on Jun 28, 2010 at 17:53 UTC | |
by lvirden (Novice) on Jun 28, 2010 at 18:26 UTC | |
by sierpinski (Chaplain) on Jun 28, 2010 at 19:25 UTC | |
by lvirden (Novice) on Jun 29, 2010 at 12:20 UTC | |
by sierpinski (Chaplain) on Jun 29, 2010 at 13:28 UTC | |
|