Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

WSDL and SOAP::Lite question

by slayedbylucifer (Scribe)
on Aug 08, 2012 at 11:39 UTC ( #986229=perlquestion: print w/ replies, xml ) Need Help??
slayedbylucifer has asked for the wisdom of the Perl Monks concerning the following question:


THis is my 1st attempt at dealing with WSDL and perl. I am learning how to create a SOAP client in perl.

Here is the method I run in soapUI:

<soap:Envelope xmlns:soap="" xm +lns:soap1=""> <soap:Header/> <soap:Body> <soap1:Login> <soap1:organizationId>1</soap1:organizationId> <!--Optional:--> <soap1:userName>my_username</soap1:userName> <!--Optional:--> <soap1:password>my_password</soap1:password> </soap1:Login> </soap:Body> </soap:Envelope>

and here is the responce I get in soapUI

<soap:Envelope xmlns:soap="" xm +lns:xsi="" xmlns:xsd="http:/ +/"> <soap:Body> <LoginResponse xmlns=" +ter"> <LoginResult> <SessionId>3144920</SessionId> <AccountId>2</AccountId> <OrganizationId>1</OrganizationId> <Token>fsTTTxUZml7QY/mu3TCkKqzrBbQ=</Token> </LoginResult> </LoginResponse> </soap:Body> </soap:Envelope>

You can see that I am able to get the "session ID" and "Token" from above output in soapUI.

Now I want to retrieve the same information using perl. so this is hte code I have written:

#!/usr/bin/perl -w use strict; use SOAP::Lite; use Data::Dumper; my $soap = SOAP::Lite -> uri ('http://my_website/Services/SoapAdapter.asmx?WSDL' +) -> proxy ('http://my_website/Services/SoapAdapter.asmx?WSD +L'); my $something = $soap->Login (1, 'my_username', 'my_password'); print $something;

and perl script gives me only "1" as the output irrespective of whether I pass correct password or wrong. so This makes me feel that my script is not really getting through the authentication.

Could you tell me where I am going wrong. Thanks

Comment on WSDL and SOAP::Lite question
Select or Download Code
Replies are listed 'Best First'.
Re: WSDL and SOAP::Lite question
by Anonymous Monk on Aug 08, 2012 at 12:06 UTC
      Thanks for the suggestion. Right now i am working on something else. I Will get back to the SOAP thing soon and will post my out-comings on this thread.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://986229]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2015-12-02 06:53 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (35 votes), past polls