Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Perl WSDL WebService Call

by furry_marmot (Pilgrim)
on Feb 29, 2012 at 21:40 UTC ( #957037=note: print w/ replies, xml ) Need Help??


in reply to Perl WSDL WebService Call

Well, first you should open a browser and try to load http://localhost:8080/service.svc?wsdl. If that doesn't work, you found your problem.

If that works, then maybe add some print statements to you code so you see what's giving the error. For example:

use SOAP::Lite; my $lite = SOAP::Lite -> service('http://localhost:8080/service.svc?ws +dl'); print "This is after creating \$lite\n"; my $arg1 ="SRC"; my $arg2 = "ARG"; my @arg3 = ('test1','test2','test3'); my @res = $lite->Func($arg1,$arg2,@arg3); print "This is after running Func\n";

My guess would be that either the URL is no good, or Func is causing the problem. What is Func? Care to share some code so we know what the heck you're doing?

--marmot


Comment on Re: Perl WSDL WebService Call
Select or Download Code
Re^2: Perl WSDL WebService Call
by Anonymous Monk on Aug 09, 2014 at 06:34 UTC
    Does anyone know how can i send the oauth token with SOAP::Lite -> service I think i need to add it to the Authorization Header but i cant figure out how to do it

      Does anyone know how can i send the oauth token with SOAP::Lite -> service I think i need to add it to the Authorization Header but i cant figure out how to do it

      First you need to know where it needs to go, then just get it there, ->transport is the LWP object you want

        Hi , Thanks for your quick reply :-) my current Code: my $token = getValidToken(); my $url = "https://sepm-site:8446/sepm/ws/v1/LicenseService?wsdl"; my $service = SOAP::Lite->service($url); print "web method : ", $service->getLicenseSummaryInfo(), "\n"; how can i add the Oauth token to the service Object? / or how can i add it to the header
        Hi, I tried to add $service->transport->http_request->headers->push_header('Authorization'=>$token); but i get the following error Can't call method "http_request" on an undefined value at C:/Program Files (x86)/NextNine/SiteServer/Perl/ActivePerl-5.14.2.1402/perl/site/lib/SOAP/Li te.pm line 482.
        Hi thanks again for your help i am not sure how can i replace my $url = "https://sepm-site:8446/sepm/ws/v1/LicenseService?wsdl"; #my $service = soap->service($url); with my $soap = SOAP::Lite->uri( 'http://127.0.0.1/MyModule' ) ->proxy( 'http://127.0.0.1:1203' ); What will be my uri and what is the proxy

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://957037]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2014-08-31 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls