🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.perl
Article #51777

Zapytanie o Allegro WebAPI + SOAP::Lite

#51777
From: mp
Date: Mon, 15 Feb 2010 11:09
42 lines
2206 bytes
Witam.
Chciałbym za pomoca skryptu Perla wywołać funkcje Allegro WebApi, sluzaca do 
wyszukiwanie przedmiotow na aukcjach Allegro. Problem w tym, ze funkcja 
odpowiedzialna za to (tj. doSearch()) nie wyświetla żadnych informacji 
(wyników, błędów). Podejrzewam, ze gdzies po drodze do niej popelnilem 
bledy. Z gory dziekuje za wszelka pomoc i dolaczam swoj kod.

use strict;
use SOAP::Lite;
use Data::Dumper;
use DBI;

#dane dostepowe do Allegro API
my $CONFIG_LOGIN = "...";
my $CONFIG_PASSWORD = "...";
my $CONFIG_APIKEY ="...";
my $CONFIG_COUNTRY = "1";
my $CONFIG_WSDL ="http://localhost/allegro.wsdl";

my $Klient = SOAP::Lite->service($CONFIG_WSDL);
my @wersja = $Klient->doQuerySysStatus(1, $CONFIG_COUNTRY, $CONFIG_APIKEY);

my @sesja = $Klient->doLogin($CONFIG_LOGIN, $CONFIG_PASSWORD, 
$CONFIG_COUNTRY, $CONFIG_APIKEY, $wersja['ver-key']);

my %parametry = (
  'search-string'    => 'slowo',
  'search-options'    => '1',
  'search-order'    => '2',
  'search-order-type'    => '0',
  'search-country'    => '0',
  'search-category'    => '0',
  'search-city'    => '',
  'search-state'    => '',
  'search-price-from'    => '0',
  'search-price-to'    => '300',
  'search-offset'    => '0',
  'search-limit'    => '50'
);

my @wynik = $Klient->doSearch($sesja['session-handle-part'],%parametry);
print @wynik 
Technical Details
Message-ID: <hlba0h$m17$1@news2.ipartners.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!news2.ipartners.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!nf1.ipartners.pl!ipartners.pl!news2.ipartners.pl!not-for-mail
From: "mp" <bl@bla.pl>
Newsgroups: pl.comp.lang.perl
Subject: Zapytanie o Allegro WebAPI + SOAP::Lite
Date: Mon, 15 Feb 2010 12:09:02 +0100
Organization: GTS Energis
Lines: 44
Message-ID: <hlba0h$m17$1@news2.ipartners.pl>
NNTP-Posting-Host: firma1.comdrev.com.pl
X-Trace: news2.ipartners.pl 1266232145 22567 193.238.171.11 (15 Feb 2010 11:09:05 GMT)
X-Complaints-To: abuse@ipartners.pl
NNTP-Posting-Date: 15 Feb 2010 11:09:05 GMT
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MSMail-Priority: Normal
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit