Hi

Basic Authentication just doesn't seem to 'attach' to the calls. What am I doing wrong here?

use XML::Compile::SOAP::WSS;
use XML::Compile::WSDL11;
use XML::Compile::SOAP11;
use XML::Compile::Transport::SOAPHTTP;

my $wsdlfn = '...';
my $xsdfn = '...;
my $user = '...';
my $password = '...';

my $wss  = XML::Compile::SOAP::WSS->new; # Should hook the WSDL parser
my $wsdl = XML::Compile::WSDL11->new($wsdlfn);
$wsdl->importDefinitions($xsdfn);

my $auth = $wss->basicAuth(
    username => $user,
    password => $password,
);

... and then compileClient and call. The request headers look like this with $trace->printRequest:

User-Agent: libwww-perl/6.07
Content-Length: 1043
Content-Type: text/xml; charset="utf-8"
SOAPAction: "sendNotification"
X-LWP-Version: 6.07
X-XML-Compile-Cache-Version: 1.02
X-XML-Compile-SOAP-Version: 3.05
X-XML-Compile-Version: 1.47
X-XML-LibXML-Version: 2.0116

So it fails with 401. Now, if I write a transport_hook myself, I get the correct authentication, and the call is successful.

Obviously I'm missing something when trying to use XML::Compile::SOAP::WSS. But I can't see what (?)

_______________________________________________
Xml-compile mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile

Reply via email to