in reply to Retrieving data using Soap Lite.

$line most likely contains a newline at the end. Maybe the service you're connecting to does not like that?

Have you tried with a hardcoded value for $line?

Replies are listed 'Best First'.
Re^2: Whats wrong with this code?
by Gkandoi (Initiate) on Sep 08, 2014 at 19:52 UTC
    You mean by using something like ecNumber*X.X.X.X, directly?
    $resultString = SOAP::Lite -> uri('http://www.brenda-enzymes.org/soap2') -> proxy('http://www.brenda-enzymes.org/soap2/brenda_server.php') -> getSequence("ecNumber*1.1.1.1#source*Swiss-Prot#textmining*0") -> result;
    This code works fine.

      The next step then would be to compare what you have in $line to a hardcoded value. Like I already said, you most likely have a newline (and/or other stuff) at the end of $line and want to remove that before sending it off to the server:

      while( defined( my $line=<FILE> )) { my $sequence= "ecNumber*$line#source*Swiss-Prot#textmining*0"; print "Retrieving [$sequence]\n"; $resultString = SOAP::Lite -> uri('http://www.brenda-enzymes.org/soap2') -> proxy('http://www.brenda-enzymes.org/soap2/brenda_server.php') -> getSequence($sequence) -> result; };