Subject: | tag `Usage' not used at wsse:SecurityTokenReference |
Date: | Thu, 18 Jun 2015 16:41:40 +0000 (UTC) |
To: | "bug-XML-Compile-WSS [...] rt.cpan.org" <bug-XML-Compile-WSS [...] rt.cpan.org> |
From: | Ian Mitchell <mitchell.ianj [...] yahoo.com> |
First, thank you for dedicating the time and energy in creating this extensive suite of Perl Modules. They are impressive.
I ran across an issue while attempting to sign and timestamp a request using XML::Compile::WSS in a SOAP 1.2 request. The script returns the following error messages:
Errors:mistake: tag `Usage' not used at wsse:SecurityTokenReference
Use of uninitialized value $ns in hash element at /usr/lib/perl/site_perl/5.10.1/XML/Compile/Translate/Writer.pm line 993.
Relevant code:use strict;
use XML::Compile qw(initParser);
use XML::Compile::WSDL11;
use XML::Compile::SOAP12;
use XML::Compile::SOAP::WSS;
use XML::Compile::SOAP::Trace;
use XML::Compile::Transport::SOAPHTTP;
use XML::Compile::WSS::SecToken::X509v3;
use XML::Compile::WSS::Signature;
use Crypt::OpenSSL::X509;
my $wss = XML::Compile::SOAP::WSS->new;
my $wsdl = XML::Compile::WSDL11->new('myschema.wsdl');
my @features = ($wss->signature(token => XML::Compile::WSS::SecToken::X509v3->new( id => 'username', certificate => Crypt::X509->new_from_file('cert.pem')), private_key => 'private.pem'));
my $call = $wsdl->compileClient('myOperation');
my ($answer, $trace) = $call-> (
wsse_Security => \@features,
.... other data ....
);
The resulting request does appear to be adding a time stamp and a signature, but the web service on the other end is returning a 415 Unsupported Media Type error that may or may not be related to the errors above.
Any ideas?