Bonjour,

J'essaie d'utiliser un webservice déjà existant. Après de nombreux échecs (je suis nouveau à la fois en Perl et en WS ) et de recherches sur le net, j'arrive enfin à un semblant de communication avec le server et j'ai l'erreur suivante :
soap:Server, Server was unable to process request. ---> Object reference not set to an instance of an object.

Mon script :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use SOAP::Lite  +trace =>  'debug';
 
my $var = SOAP::Data->new(name => 'NTLogin', value => "123456", type =>'s:string');
 
my $resultLogin = SOAP::Lite
  -> uri('http://xxxxxx.org')
  -> proxy('http://yyyyyy/zzzzzz/directory.asmx')
  -> on_action( sub { join '/', @_ } )
  -> GetUIDFromNTLogin($var);
 
print "lets test it...\n\n";
 
unless ($resultLogin->fault()) {
  print "works !\n\n";
  print $resultLogin->result();
} else {
  print "error:\n";
  print join ', ', 
    $resultLogin->faultcode, 
    $resultLogin->faultstring;
}
La trace :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
SOAP::Transport::HTTP::Client::send_receive: POST http://yyyyyy/zzzzzz/directory.asmx
Accept: text/xml
Accept: multipart/*
Content-Length: 529
Content-Type: text/xml; charset=utf-8
SOAPAction: http://tempuri.org/GetUIDFromNTLogin
 
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w
3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/e
ncoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap
.org/soap/encoding/"><SOAP-ENV:Body><namesp1:GetUIDFromNTLogin xmlns:namesp1="ht
tp://tempuri.org"><NTLogin xsi:type="s:string">123456</NTLogin></namesp1:GetUI
DFromNTLogin></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
Cache-Control: private
Date: Wed, 23 May 2012 16:39:13 GMT
Server: Microsoft-IIS/6.0
Content-Length: 441
Content-Type: text/xml; charset=utf-8
Client-Date: Wed, 23 May 2012 16:39:13 GMT
Client-Peer: 111.222.333.444:80
Client-Response-Num: 1
Set-Cookie: BIGipServerEquitiesDerivatives-http=1234567890.12345.0000; path=/
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
 
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.
xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode
>soap:Server</faultcode><faultstring>Server was unable to process request. ---&g
t; Object reference not set to an instance of an object.</faultstring><detail />
</soap:Fault></soap:Body></soap:Envelope>
lets test it...
 
error:
soap:Server, Server was unable to process request. ---> Object reference not set
 to an instance of an object.Press any key to continue . . .
J'ai trouvé pas mal de topic sur ce sujet, mais très peu de réponses... Quelqu'un aurait-il une idée là-dessus ?

Merci beaucoup d'avance

Will1v,