Loading ...
Sorry, an error occurred while loading the content.

NTLM with WSDL?

Expand Messages
  • ashgromnies
    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
    Message 1 of 2 , Apr 14, 2006
    • 0 Attachment
      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/ProjectServer/');
      $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.
    • Achim Grolms
      ... In general IIS support the Authentication Schemes -Basic -NTLM -SPNEGO Do a HEAD request and check what your ISS supports. If your Client is using LWP for
      Message 2 of 2 , Apr 17, 2006
      • 0 Attachment
        On Friday 14 April 2006 20:33, you wrote:
        > 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).

        In general IIS support the Authentication Schemes

        -Basic
        -NTLM
        -SPNEGO

        Do a HEAD request and check what your ISS supports.

        If your Client is using LWP for doing the HTTP connection
        the Authentication protocols can be handled by:

        - LWP::Authen::Ntlm

        to do NTLM Authentication

        - LWP::Authen::Negotiate

        to do SPNEGO Authentication.
        That means you can use Kerberos to authenticate against your IIS
        from all platforms with a working Kerberosinstallation.


        What Operating system are you using to run your SOAP Clients?

        Achim
      Your message has been successfully submitted and would be delivered to recipients shortly.