Ok, I try to use new-style interface:
my $wss = XML::Compile::SOAP::WSS->new;
my @urls = @{ $self->{wsdl_url} };
while (my $url = shift(@urls)) {
my $xml = eval { XML::LibXML->load_xml( location => $url ) };
die __PACKAGE__, "->new (load_xml): $@\n" if ($@);
if ($self->{wsdl}) {
$self->{wsdl}->addWSDL( $xml );
}
else {
$self->{wsdl} = XML::Compile::WSDL11->new( $xml );
}
}
my $nonce = random_string('s' x 20);
my $now = time();
$self->{auth} = $wss->wsseBasicAuth(
$self->{username},
$self->{password},
UTP11_PDIGEST,
nonce => $nonce,
created => $now,
);
But error "error: unknown name prefix `wsse' for `wsse:Nonce'" when created
second object still exists.
And for correct authorizatin I change 79 line of
XML::Compile::WSS::BasicAuth from
$w_nonce->($doc, {_ => $enc});
to
$w_nonce->($doc, {_ => $enc, EncodingType => "
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary
"});
On Thu, Nov 1, 2012 at 1:58 PM, Mark Overmeer via RT <
bug-XML-Compile-WSS@rt.cpan.org> wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=80544 >
>
> *
http://chernomyrdin.ya.ru/ via RT (bug-XML-Compile-WSS@rt.cpan.org)
> [121101 09:12]:
> > Thu Nov 01 05:11:53 2012: Request 80544 was acted upon.
> > Transaction: Ticket created by
http://chernomyrdin.ya.ru/
> > Queue: XML-Compile-WSS
> > Subject: Error in 1.03
> > Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=80544 >
> >
> > my code (see zip file) is broken. Sympthoms: I can't create multiple
> > XML::Compile::SOAP::WSS objects. First object created normaly, second
> > not created with diagnostics:
> > error: unknown name prefix `wsse' for `wsse:Password'
>
> Probably you use the old-style interface. Since 1.00, there is a
> much cleaner interface.
>
> On this moment, I am finishing release 1.04, which fixes your problem.
> However, better is to use one explicit schema object for all your
> security elements... the SYNOPSIS tells you how.
> --
> Regards,
> MarkOv
>
> ------------------------------------------------------------------------
> Mark Overmeer MSc MARKOV Solutions
> Mark@Overmeer.net solutions@overmeer.net
>
http://Mark.Overmeer.net http://solutions.overmeer.net
>
>
>
--
With best, Andrey Chernomyrdin