I am having trouble running some test code using SOAP::Lite for perl.

The code (listed below) simply hits a prime number generator that is freely available that I found through xmethods.net.

It should be relatively simple test code, the only complication being the internal proxy server, but that seems to be passing through OK. (user, pass & server name removed)

I'm sure it is something simple, but I just don't see the issue.

#!/usr/bin/perl -w

  use SOAP::Lite;
  $service = SOAP::Lite -> uri('tns:PrimeNumbersSoap')
               -> proxy('http://www50.brinkster.com/vbfacileinpt/np.asmx',
                  proxy => ['http' => 'http://UNAME:PASSWD@PROXYSERVER:80']);
  $result = $service -> GetPrimeNumbers('100') -> result();

#print "Content-Type: text/html\n\n";

print "something\n";

  $i = -1;
  while ( $result->[++$i] )
  {
    print "anything: $result->[$i]\n";
  }

print "something else i:$i\n";

I think it was this simple:

$result = $service -> GetPrimeNumbers('100') -> result();

should be :

$result = $service -> GetPrimeNumbers('100') -> result;

It should not have the trailing () characters. Sadly the target site is down today so I can't test.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.