V
V
Vyacheslav Golovanov2013-06-21 01:34:42
Perl
Vyacheslav Golovanov, 2013-06-21 01:34:42

Need help to create a perl script for tracking a package using Russian Post tracking

There is access to the mail service at voh.russianpost.ru :8080/niips-operationhistory-web/OperationHistory?wsdl (given a login with a password).
I have never worked with SOAP before, so I don't understand how to send requests and how to receive responses at all. Smoking manuals on SOAP::Lite and SOAP::WSDL did not help.
I found scraps of information, examples of scripts in languages ​​I did not know, and in connection with this I got completely confused.

Some working example of request on perl is necessary.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
N
nochkin, 2013-06-21
@nochkin

Something like this?
www.perl.com/pub/2001/01/soap.html
More information here with similar examples:
cookbook.soaplite.com/

V
Vyacheslav Golovanov, 2013-06-21
@SLY_G

I found it. It does not help at all to understand how to work with wsdl from Mail.
Describes how a custom server communicates with a client.
As with any new technology, it is difficult to bridge the gap between “in principle, it works like this” and “in this particular case, you need to do this and that”

A
Actor, 2013-06-21
@Actor

I can only suggest in PHP, maybe you decide to do it on it.
This code connects to the web service and performs authorization (receives an authorization token)
A very common problem of non-working code is in the parameters passed to the function, look carefully!
$client = new
SoapClient(
" site.com?wsdl ", array("trace" => 1,'cache_wsdl' => WSDL_CACHE_NONE)
);
$authenticator = $client->AuthenticateUser(
array( 'Credentials' =>
array(
'IntegrationID' => '1234567890',
'Username' => 'user',
'Password' => 'name'
)
)
);
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi=" www.w3.org/2001/XMLSchema-instance " xmlns:xsd=" www.w3.org/2001 /XMLSchema » xmlns:soap12=« www.w3.org/2003/05/soap-envelope »>
<soap12:Body>
guid
string
string
</soap12:Body>
</soap12:Envelope>
What we are interested in here is the set parameters
guid
string
string
if translated into php it will be an array: array('Credentials' => array('IntegrationID', 'Username', 'Password'))
This is how all SOAP works.
PS Write in a personal how to make the code on Habré ...

P
perl_demon, 2013-06-21
@perl_demon

look at this: https://metacpan.org/release/W3C-SOAP
There are utilities in the kit that should help you figure it out.

V
vsespb, 2013-06-21
@vsespb

First, smoke the manuals for the SOAP protocol itself, and not for the cpan modules.

E
ellesar2001, 2013-06-23
@ellesar2001

Counter question, but where did you get the login-password? How to get it? I would like to attach to my store.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question