You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by Ma...@fiducia.de on 2010/12/01 10:22:29 UTC

Antwort: Re: Migration wss4j 1.5 -> 1.6

Hallo,

thanks! It works now with your hints!
I could test my  changes of WSEncryptionPart and it works too for me. But I
think that more tests are needed with other scenarios...

Greetings,
Marcin.



Von:	Colm O hEigeartaigh <co...@apache.org>
An:	dev@ws.apache.org
Datum:	30.11.2010 17:25
Betreff:	Re: Migration wss4j 1.5 -> 1.6



1) WSSecurityEngineResult.TAG_SIGNED_ELEMENT_IDS was removed in
1.6-SNAPSHOT. Instead, the WSDataRef instances corresponding to the
signed elements are stored in
WSSecurityEngineResult.TAG_DATA_REF_URIS. Take a look at
WSSecurityUtil.checkSignsAllElements(WSSecurityEngineResult, String[])
to see how to use this.

2) The way signatures are computed and inserted into the security
header has changed in 1.6-SNAPSHOT, due to the move to use the JSR-105
API for XML Digital Signature. You don't explicitly prepend or append
the signature token element to the security header any more. Instead,
you tell "computeSignature" where you want the element to go, passing
through the list of references obtained by "addReferencesToSign". Take
a look at the different "computeSignature" methods in WSSecSignature.
Alternatively, you can call WSSecSignature.build, which will do all
this for you.

Colm.

On Tue, Nov 30, 2010 at 4:02 PM,  <Ma...@fiducia.de> wrote:
> Hello,
>
> I try to fix the problem with WSEncryptionPart and multiple elements for
> encryption/sign (Jira WSS-254). I work on the code for wss4j 1.6 (trunk).
> All work is possibly done, and I want to test it with my application, but
> there are some API changes from 1.5.9 to 1.6. Now I have following
problems
> - perseaps someone can tell me how to use this code parts now (I look for
> the equivalent methods/constants)
> 1):
> org.apache.ws.security.WSSecurityEngineResult.TAG_SIGNED_ELEMENT_IDS
> for: WSSecurityEngineResult ser =...
> List signedElements = getElementsInSignature((java.util.Set)
> ser.get(WSSecurityEngineResult.TAG_SIGNED_ELEMENT_IDS));
>
> 2)
> :WSSecSignature signature = new WSSecSignature();
> ...
> signature.addReferencesToSign(signatureParts, secHeader);
> signature.prependToHeader(secHeader);
> signature.prependBSTElementToHeader(secHeader);
> signature.computeSignature();
> the underlined methods exists no more or have other signatures.
>
> Can you help me?
>
> Greetings,
> Marcin Markiewicz
>
>
>
>
----------------------------------------------------------------------------------------------------------------------------------------------

>
> Fiducia IT AG
> Fiduciastraße 20
> 76227 Karlsruhe
>
> Sitz der Gesellschaft: Karlsruhe
> AG Mannheim HRB 100059
>
> Vorsitzender des Aufsichtsrats: Gregor Scheller
> Vorsitzender des Vorstands: Michael Krings
> Stellv. Vorsitzender des Vorstands: Klaus-Peter Bruns
> Vorstand: Jens-Olaf Bartels, Hans-Peter Straberger
>
> Umsatzsteuer-ID.Nr. DE143582320, http://www.fiducia.de
>
----------------------------------------------------------------------------------------------------------------------------------------------

>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org






----------------------------------------------------------------------------------------------------------------------------------------------


Fiducia IT AG
Fiduciastraße 20
76227 Karlsruhe

Sitz der Gesellschaft: Karlsruhe
AG Mannheim HRB 100059

Vorsitzender des Aufsichtsrats: Gregor Scheller
Vorsitzender des Vorstands: Michael Krings
Stellv. Vorsitzender des Vorstands: Klaus-Peter Bruns
Vorstand: Jens-Olaf Bartels, Hans-Peter Straberger

Umsatzsteuer-ID.Nr. DE143582320, http://www.fiducia.de
----------------------------------------------------------------------------------------------------------------------------------------------