In our project the Java webservice communicate with the backend program written in C and Perl to process. We are using the ProcessBuilderto execute a backend (UNIX) job FrameworkHandler.
ProcessBuilder process;
process.Start(FrameworkHandler -a ACTION)
FrameworkHandler invokes a Perl script to perform some action. The Perl script internally does a diff command between two XML files and uses the print function to print the error:
sub print_error
{
$err_msg = shift;
print STDERR "$err_msg\n";
}
Whenever there is a difference between the files the Perl program hangs in the print_error function. If we execute the Perl program in the UNIX shell it is working without any issues. But if we execute the Perl through the webservice, it is not returning after the diff command. Due to this, the webservice is also not returning the response. Whether the greater than (>) symbols in the XML tags are creating problem?
Any help is much appreciated.
Part of Error:
< diff -udr --new-file --label=postProcess1 --label=postProcess2 postProcess1 postProcess2
< --- postProcess1
< +++ postProcess2
< @@ -124,6 +124,36 @@
< <LOCATION></LOCATION>
< <ADDRESS_PART1>Test Address ^D</ADDRESS_PART1 >
< </address_details>
< + <address_details>
< + <CITY></CITY>
< + <STATE>12</STATE>
Thanks, Mathew Liju