Hello guys,
i am trying to make a call to .net based API via SOAP::WSDL, first i need to
make a call with my user name and password, then if that will go
through fine, i will get back a communityID and cookie, and then i can
make another calls to same API, while i have my cookie set. Here is my
code that i currently have
#!/usr/bin/perl
use SOAP::WSDL;
use HTTP::Cookies;
import SOAP::Lite +trace => 'all';
my $soap = SOAP::WSDL->new(wsdl => 'http://domain.tld/api.wsdl');
$soap->proxy('https://domain.level.tld/API/api.dll?Handler=Default',
cookie_jar => HTTP::Cookies->new());
$soap->wsdlinit(caching=>1);
$soap->call('SessionLoginTechnician',
'TechName' => 'username',
'Password' => 'password',
);
$soap->call('AccountSetStatus',
AccountNumber => 123456789,
Status => 'ACCOUNT_ACTIVE',
Justification => 'api testing',
StatusCode => 0
);
first call goes very well, i am getting in return communityID that i am
expecting, however second call i am getting an eror message that is
telling me that i am not authenticated....
i see soap call and that is forming correctly, and i am even getting right
response from API with 4 digit error code (well i wish i would get that
response lol)
i am assuming that i am not setting cookie correctly, or maybe i am totaly
missing something, please help me out guys :)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.