Skip Menu |

This queue is for tickets about the XML-Compile-WSS CPAN distribution.

Report information
The Basics
Id: 80544
Status: resolved
Priority: 0/
Queue: XML-Compile-WSS

People
Owner: Nobody in particular
Requestors: chernomyrdin [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.03
Fixed in: (no value)



Subject: Error in 1.03
After upgrade packages: XML::Compile 1.27 => 1.29 XML::Compile::SOAP 2.29 => 2.32 XML::Compile::WSS 0.911 => 1.03 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'
Subject: sample.zip
Download sample.zip
application/zip 8.8k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #80544] Error in 1.03
Date: Thu, 1 Nov 2012 10:58:21 +0100
To: "http://chernomyrdin.ya.ru/ via RT" <bug-XML-Compile-WSS [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* http://chernomyrdin.ya.ru/ via RT (bug-XML-Compile-WSS@rt.cpan.org) [121101 09:12]: Show quoted text
> 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
Subject: Re: [rt.cpan.org #80544] Error in 1.03
Date: Thu, 1 Nov 2012 16:30:31 +0300
To: bug-XML-Compile-WSS [...] rt.cpan.org
From: Andrey Chernomyrdin <chernomyrdin [...] gmail.com>
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
Subject: Re: [rt.cpan.org #80544] Error in 1.03
Date: Thu, 1 Nov 2012 15:09:51 +0100
To: "chernomyrdin [...] gmail.com via RT" <bug-XML-Compile-WSS [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* chernomyrdin@gmail.com via RT (bug-XML-Compile-WSS@rt.cpan.org) [121101 13:31]: Show quoted text
> Queue: XML-Compile-WSS > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=80544 > > > Ok, I try to use new-style interface: > $self->{wsdl}->addWSDL( $xml );
Where does this wsdl come from? It is instantiated before the WSS... don't do that. Show quoted text
> 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 > "});
You are right about the fix... although it should work anyway, because the Nonce is a random string. A base64 of such a string still is random. -- Thanks, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #80544] Error in 1.03
Date: Thu, 1 Nov 2012 15:12:01 +0100
To: "chernomyrdin [...] gmail.com via RT" <bug-XML-Compile-WSS [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* MARKOV Solutions (solutions@overmeer.net) [121101 15:09]: Show quoted text
> > $w_nonce->($doc, {_ => $enc, EncodingType => " > > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary > > "});
> > You are right about the fix... although it should work anyway, because > the Nonce is a random string. A base64 of such a string still is > random.
Oh, wait, I see why it is wrong. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Got fixed in 1.05