in reply to Re^2: SOAP::Transport::HTTP::Client::send_receive: 500 Can't connect to
in thread SOAP::Transport::HTTP::Client::send_receive: 500 Can't connect to

From somewhere, your program gets the idea that 8080 is a (https?) proxy somewhere along the way. Check that %ENV does not contain the string 8080 anywhere. Maybe it is $ENV{HTTP_PROXY} or $ENV{SSL_PROXY} or $ENV{HTTPS_PROXY} or something like that. It's best to remove (or at least, closely inspect) these environment variables before the Perl script actually launches, so that the SSL libraries have no chance of separately picking them up before you manipulate them from Perl.

Replies are listed 'Best First'.
Re^4: SOAP::Transport::HTTP::Client::send_receive: 500 Can't connect to
by jgfcoimbra (Initiate) on Jan 25, 2011 at 10:45 UTC
    Hi, After removing the the environment variables I got something different in the output but still with some errors.
    joacoimb@farem001 ui_config_tools $ perl ./webdav_interface2.pl HTTP_PROXY: SSL_PROXY: HTTPS_PROXY: SOAP::Lite::new: () SOAP::Transport::HTTP::Client::new: () SOAP::Deserializer::new: () SOAP::Parser::new: () SOAP::Schema::new: () SOAP::Lite::call: () SOAP::Serializer::envelope: () SOAP::Serializer::envelope: GetListCollection SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0xbea7 +00) SOAP::Transport::HTTP::Client::send_receive: POST http://in.nokia.com/ +sites/s40configmanag/_vti_bin/lists.asmx HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 457 Content-Type: text/xml; charset=utf-8 SOAPAction: http://schemas.microsoft.com/sharepoint/soap/GetListCollec +tion <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:/ +/www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xm +lsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema +" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmln +s:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetLis +tCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/" xsi +:nil="true" /></soap:Body></soap:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0xee6 +5a0) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 401 Unauthorized Date: Tue, 25 Jan 2011 10:41:04 GMT Server: Microsoft-IIS/7.5 WWW-Authenticate: NTLM Content-Length: 0 Client-Date: Tue, 25 Jan 2011 10:41:05 GMT Client-Peer: 65.54.31.254:443 Client-Response-Num: 1 Client-SSL-Cert-Issuer: /C=US/O=Entrust, Inc./OU=www.entrust.net/rpa i +s incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Cert +ification Authority - L1C Client-SSL-Cert-Subject: /C=FI/L=Espoo/O=Nokia Corporation/OU=Nokia Co +rporation/CN=*.nokia.com Client-SSL-Cipher: AES128-SHA Client-SSL-Warning: Peer certificate not verified Client-Warning: Unsupported authentication scheme 'ntlm' MicrosoftSharePointTeamServices: 14.0.0.5114 SPRequestGuid: 242ea513-9b2c-45f7-a9aa-79d20cf4465a X-Powered-By: ASP.NET 401 Unauthorized at ./webdav_interface2.pl line 51 SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Parser::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Transport::HTTP::Client::DESTROY: () SOAP::Transport::DESTROY: () SOAP::Schema::DESTROY: () SOAP::Serializer::DESTROY: () SOAP::Data::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Lite::DESTROY: () SOAP::Parser::DESTROY: () SOAP::Transport::DESTROY: () SOAP::Serializer::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Lite::DESTROY: () joacoimb@farem001 ui_config_tools $
    This seems to be my error now:

    SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 401 Unauthorized

    Am I doing something wrong?
      Am I doing something wrong?

      Apparently so :)

      Client-Warning: Unsupported authentication scheme 'ntlm'

      Means you need to install Authen::NTLM

      It also seems you're reinventing HTTP::DAV

        Hi again,

        Your tips are being very useful, I managed to go a bit further with your suggestions. I had a problem with the NTLM module instalation, but now it seems to be OK. Can you have another look to a new output to see if you can spot something else that I am doing wrong?

        joacoimb@farem001 ui_config_tools $ perl ./webdav_interface2.pl HTTP_PROXY: SSL_PROXY: HTTPS_PROXY: LWP::UserAgent::new: () SOAP::Lite::new: () LWP::UserAgent::new: () SOAP::Transport::HTTP::Client::new: () SOAP::Deserializer::new: () SOAP::Parser::new: () LWP::UserAgent::new: () SOAP::Schema::new: () SOAP::Lite::call: () SOAP::Serializer::envelope: () SOAP::Serializer::envelope: GetListCollection SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0xb9cb +c0) SOAP::Transport::HTTP::Client::send_receive: POST https://in.nokia.com +/sites/s40configmanag/_vti_bin/lists.asmx HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 457 Content-Type: text/xml; charset=utf-8 SOAPAction: http://schemas.microsoft.com/sharepoint/soap/GetListCollec +tion <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:/ +/www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xm +lsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema +" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmln +s:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetLis +tCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/" xsi +:nil="true" /></soap:Body></soap:Envelope> LWP::UserAgent::request: () LWP::UserAgent::send_request: POST https://in.nokia.com/sites/s40confi +gmanag/_vti_bin/lists.asmx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::http::request: Keep the http connection to in.nokia.com +:443 LWP::UserAgent::request: Simple response: Unauthorized LWP::Authen::Ntlm::authenticate: authenticate() has been called LWP::Authen::Ntlm::authenticate: In first phase of NTLM authentication LWP::Authen::Ntlm::authenticate: Returning response object with auth h +eader: Authorization NTLM TlRMTVNTUAABAAAAB7IAAAAAAAAAAAAADQANACAAAABOT0UvL2p +vYWNvaW1i LWP::UserAgent::request: () LWP::UserAgent::send_request: POST https://in.nokia.com/sites/s40confi +gmanag/_vti_bin/lists.asmx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::http::request: Keep the http connection to in.nokia.com +:443 LWP::UserAgent::request: Simple response: Unauthorized LWP::Authen::Ntlm::authenticate: authenticate() has been called LWP::Authen::Ntlm::authenticate: In second phase of NTLM authenticatio +n LWP::Authen::Ntlm::authenticate: Returning response object with auth h +eader: Authorization NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAwADABwAAAAAAA +AADwAAAAAAAAAPAAAAAAAAAA8AAAABYKBAtHK8K6fcN5gxEoJPF4ZZEGuN5XjIFtXFKOf +xWhOBLBaSjKDlc3bhCSCtjbXl3u9XwYBsB0AAAAPTQBHAA== LWP::UserAgent::request: () LWP::UserAgent::send_request: POST https://in.nokia.com/sites/s40confi +gmanag/_vti_bin/lists.asmx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::http::request: Keep the http connection to in.nokia.com +:443 LWP::UserAgent::request: Simple response: Unauthorized LWP::Authen::Ntlm::authenticate: authenticate() has been called LWP::Authen::Ntlm::authenticate: In first phase of NTLM authentication LWP::Authen::Ntlm::authenticate: Returning response object with auth h +eader: Authorization NTLM TlRMTVNTUAABAAAAB7IAAAAAAAAAAAAADQANACAAAABOT0UvL2p +vYWNvaW1i LWP::UserAgent::request: () LWP::UserAgent::send_request: POST https://in.nokia.com/sites/s40confi +gmanag/_vti_bin/lists.asmx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::http::request: Keep the http connection to in.nokia.com +:443 LWP::UserAgent::request: Simple response: Unauthorized LWP::Authen::Ntlm::authenticate: authenticate() has been called LWP::Authen::Ntlm::authenticate: In second phase of NTLM authenticatio +n LWP::Authen::Ntlm::authenticate: Returning response object with auth h +eader: Authorization NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAwADABwAAAAAAA +AADwAAAAAAAAAPAAAAAAAAAA8AAAABYKBAmh1/X1yQO0Lu68WVSqONzSpIZq2xDIDVECR +ROl9SMroK62gT8d9zSXkboffNuWSegYBsB0AAAAPTQBHAA== LWP::UserAgent::request: () LWP::UserAgent::send_request: POST https://in.nokia.com/sites/s40confi +gmanag/_vti_bin/lists.asmx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::http::request: Keep the http connection to in.nokia.com +:443 LWP::UserAgent::request: Simple response: Unauthorized LWP::Authen::Ntlm::authenticate: authenticate() has been called LWP::Authen::Ntlm::authenticate: In first phase of NTLM authentication LWP::Authen::Ntlm::authenticate: Returning response object with auth h +eader: Authorization NTLM TlRMTVNTUAABAAAAB7IAAAAAAAAAAAAADQANACAAAABOT0UvL2p +vYWNvaW1i LWP::UserAgent::request: () LWP::UserAgent::send_request: POST https://in.nokia.com/sites/s40confi +gmanag/_vti_bin/lists.asmx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::http::request: Keep the http connection to in.nokia.com +:443 LWP::UserAgent::request: Simple response: Unauthorized LWP::Authen::Ntlm::authenticate: authenticate() has been called LWP::Authen::Ntlm::authenticate: In second phase of NTLM authenticatio +n LWP::Authen::Ntlm::authenticate: Returning response object with auth h +eader: Authorization NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAwADABwAAAAAAA +AADwAAAAAAAAAPAAAAAAAAAA8AAAABYKBAgkTFenPmuBC1zXUPNL48T8KiPGy5RkK2nuL +Q3YtrTGqliwickY79mWk8sxcxzrD5AYBsB0AAAAPTQBHAA== LWP::UserAgent::request: () LWP::UserAgent::send_request: POST https://in.nokia.com/sites/s40confi +gmanag/_vti_bin/lists.asmx LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::Protocol::http::request: Keep the http connection to in.nokia.com +:443 LWP::UserAgent::request: Simple response: Unauthorized LWP::Authen::Ntlm::authenticate: authenticate() has been called LWP::Authen::Ntlm::authenticate: In first phase of NTLM authentication SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0xf22 +170) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 401 Unauthorized Date: Tue, 25 Jan 2011 14:32:46 GMT Server: Microsoft-IIS/7.5 WWW-Authenticate: NTLM Content-Length: 0 Client-Date: Tue, 25 Jan 2011 14:32:47 GMT Client-Peer: 65.54.31.254:443 Client-Response-Num: 7 Client-SSL-Cert-Issuer: /C=US/O=Entrust, Inc./OU=www.entrust.net/rpa i +s incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Cert +ification Authority - L1C Client-SSL-Cert-Subject: /C=FI/L=Espoo/O=Nokia Corporation/OU=Nokia Co +rporation/CN=*.nokia.com Client-SSL-Cipher: AES128-SHA Client-SSL-Warning: Peer certificate not verified Client-Warning: Credentials for 'NOE//joacoimb' failed before MicrosoftSharePointTeamServices: 14.0.0.5114 SPRequestGuid: 0316b415-d31c-4b19-bc54-3f6007b6e9e2 X-Powered-By: ASP.NET 401 Unauthorized at ./webdav_interface2.pl line 56 SOAP::Parser::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Transport::HTTP::Client::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Transport::DESTROY: () SOAP::Schema::DESTROY: () SOAP::Serializer::DESTROY: () SOAP::Data::DESTROY: () SOAP::Parser::DESTROY: () SOAP::Transport::DESTROY: () SOAP::Serializer::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Lite::DESTROY: () SOAP::Lite::DESTROY: () joacoimb@farem001 ui_config_tools $

        LWP::UserAgent::request: Simple response: Unauthorized - This line is still complaining about autentification I think

        401 Unauthorized at ./webdav_interface2.pl line 56

        This line of the script is this one here:

        $lists = $soap->GetListCollection();