#104 WSDL with NTLM on IIS

closed-invalid
Byrne Reese
WSDL (18)
5
2010-02-28
2006-04-14
ashgromnies
No

I was wondering if anyone had experience accessing a
WSDL on a
Microsoft IIS server(for example, I am accessing one on
a Microsoft
Project server).

I can't seem to get it to authenticate, I always get a
401 error. Here
is my code:

my $user = 'DOMAIN\user'; # The auth module splits
this on the '\'
my $pass = 'password';

my $server = '#########'; # I enter the IP here

# Set up the ntlm client and then the base64
encoded ntlm
handshake message

use SOAP::Transport::HTTP;
my $ua = new
SOAP::Transport::HTTP::Client(keep_alive=>1,proxy=>'http://'.$server.':80/Projec\ tServer/');
$ua->agent("Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1;
SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215)");
# This is required to store the credentials, note
that the realm
is empty
$ua->credentials($server.':80/ProjectServer', '',
$user, $pass);

use SOAP::Lite;
my $service = SOAP::Lite

->proxy('http://'.$server.':80/ProjectServer/PDS.WSDL')
->transport($ua)
->uri('http://tempuri.org/type');

->service('http://'.$server.':80/ProjectServer/PDS.WSDL');
warn(Dumper $service);

I get a message at the line where the service is set
that says...
Service description
'http://######:80/ProjectServer/PDS.WSDL' can't be
loaded: 401 Unauthorized

Does anyone know how this can be done? I know my
UserAgent is correct,
it works for XML-RPC.

Discussion

  • Martin Kutter
    Martin Kutter
    2010-02-28

    Please direct usage questions to the mailing list or the yahoo forum.

    Martin

     
  • Martin Kutter
    Martin Kutter
    2010-02-28

    • status: open --> closed-invalid