Also communicating applications via XML sounds like a job for SOAP ... http://cookbook.soaplite.com/#soap%20cookbook
José. > -----Original Message----- > From: Enric Roca [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 27, 2003 12:21 PM > To: Beginners Perl > Subject: Concurrency problem > > > Hello, > > We are using Apache 1.3.26, Perl 5.5.3 and perl-cgi > scripting to communicate to applications with XML. App1 calls > the cgi script that is placed in the other machine. The > script reads the XML message and pass it to pipe1. This > message is processed by App2 and a response message is > returned to pipe2 and sent to App1. > > The process works fine, but we have detected an issue when > more that one XML message is sent at the same time. The first > message that arrives is well processed but the second message is lost. > > Any ideas about what to do in the Perl script to avoid > concurrency problems ? > > This is the script: > > > #!/usr/local/bin/perl > print "Content-type: text/xml\n"; > use CGI; > read(STDIN, $cadena, $ENV{'CONTENT_LENGTH'}); > > $cadena =~ tr/+/ /; # reeplace the + sign by spaces > > $request = "> /myfolder/mypipe/pipe1"; > > unless (open(SYSREQUEST, $request)) > { > die("Impossible to open the pipe $request\n"); > } > > print SYSREQUEST "$cadena\n"; > > close(SYSREQUEST); > > $request2 = "/myfolder/mypipe/pipe2"; > > unless (open(SYSREQUEST2, $request2)) > { > die("Impossible to open the pipe $request2\n"); > } > > while ( <SYSREQUEST2> ) > { > print "$_\n"; > } > close(SYSREQUEST2); > > > Thank you very much in advance, > > Enric > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > **** DISCLAIMER **** "This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer". Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]