You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by "Fred Dushin (JIRA)" <ji...@apache.org> on 2008/04/17 20:01:27 UTC

[jira] Assigned: (WSS-112) DerivedKeyProcessor is overwritten if more derivedkeys are present in a Soap Message.

     [ https://issues.apache.org/jira/browse/WSS-112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fred Dushin reassigned WSS-112:
-------------------------------

    Assignee: Fred Dushin  (was: Ruchith Udayanga Fernando)

> DerivedKeyProcessor is overwritten if more derivedkeys are present in a Soap Message.
> -------------------------------------------------------------------------------------
>
>                 Key: WSS-112
>                 URL: https://issues.apache.org/jira/browse/WSS-112
>             Project: WSS4J
>          Issue Type: Bug
>         Environment: Rampart latest, Wss4J latest
>            Reporter: Rasmus Rhein Helwigh
>            Assignee: Fred Dushin
>
> org.apache.ws.security.WSSConfig.getProcessor returns a cached Processor
> public Processor getProcessor(QName el) throws WSSecurityException {
>         Processor p = (Processor) processorMap.get(el);
>         return p;
>     }
> This causes problem if two DerivedKeyProcessors are needed for the same message, as the second processor will overwrite the first.
> A fix could be to Create a new instance each time. 
> Check out this hack:
>  public Processor getProcessor(QName el) throws WSSecurityException {
>         Processor p = (Processor) processorMap.get(el);        
>         try {
> 	return (Processor) Loader.loadClass(p.getClass().getName()).newInstance();
> } catch (InstantiationException e) {
> 	throw new WSSecurityException("Unable to get processor",e);			
> } catch (IllegalAccessException e) {
> 	throw new WSSecurityException("Unable to get processor",e);
> } catch (ClassNotFoundException e) {
> 	throw new WSSecurityException("Unable to get processor",e);
> }                     
>  }
> I can try and make a better fix if requested. WCF <-> Wss4j interop will work a lot better with this fix..

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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