943,774 Members | Top Members by Rank

Apr 21st, 2009
0

new to SOAP::Lite for Perl

Expand Post »
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.

RSS, Web Services and SOAP Syntax (Toggle Plain Text)
  1. #!/usr/bin/perl -w
  2.  
  3. use SOAP::Lite;
  4. $service = SOAP::Lite -> uri('tns:PrimeNumbersSoap')
  5. -> proxy('http://www50.brinkster.com/vbfacileinpt/np.asmx',
  6. proxy => ['http' => 'http://UNAME:PASSWD@PROXYSERVER:80']);
  7. $result = $service -> GetPrimeNumbers('100') -> result();
  8.  
  9. #print "Content-Type: text/html\n\n";
  10.  
  11. print "something\n";
  12.  
  13. $i = -1;
  14. while ( $result->[++$i] )
  15. {
  16. print "anything: $result->[$i]\n";
  17. }
  18.  
  19. print "something else i:$i\n";
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rpetras is offline Offline
2 posts
since Apr 2009
Apr 23rd, 2009
0

Re: new to SOAP::Lite for Perl

I think it was this simple:

RSS, Web Services and SOAP Syntax (Toggle Plain Text)
  1. $result = $service -> GetPrimeNumbers('100') -> result();

should be :

RSS, Web Services and SOAP Syntax (Toggle Plain Text)
  1. $result = $service -> GetPrimeNumbers('100') -> result;

It should not have the trailing () characters. Sadly the target site is down today so I can't test.
Last edited by peter_budo; Apr 24th, 2009 at 4:40 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rpetras is offline Offline
2 posts
since Apr 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in RSS, Web Services and SOAP Forum Timeline: Bad XML
Next Thread in RSS, Web Services and SOAP Forum Timeline: RSS feed problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC