#!/usr/bin/perl -w use SOAP::Lite +trace => qw( debug ); my $user="perly"; my $password="xxxxx"; $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0; my $soap = SOAP::Lite->service("http://192.168.2.33:8881/ws/datacsv?wsdl"); #################################### my @headers = ( SOAP::Header->name('Username')->value($user), SOAP::Header->name('Password')->value($password), ); ################################## eval { my $result = $soap->getdata(@headers); }; if ($@) { die $@; } print $om->result(); print "HEADER @headers"; #### Name "main::om" used only once: possible typo at XML-demo9.pl line 36. SOAP::Transport::HTTP::Client::send_receive: POST ttp://192.168.2.33:8881/ws/datacsv HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 650 Content-Type: text/xml; charset=utf-8 SOAPAction: "getdata" SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 401 Unauthorized Cache-Control: must-revalidate,no-cache,no-store Connection: close Server: Jetty(8.1.7.v20120910) WWW-Authenticate: basic realm="Remote User Access" Content-Length: 1382 Content-Type: text/html;charset=ISO-8859-1 Client-Date: Thu, 05 Apr 2018 13:15:29 GMT Client-Peer: 172.20.3.239:5101 Client-Response-Num: 1 Title: Error 401 Unauthorized Error 401 Unauthorized

HTTP ERROR 401

Problem accessing /ws/stats-v2. Reason:

    Unauthorized


Powered by Jetty://
...