axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samisa Abeysinghe (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (RAMPART-69) RampartReceiver should store current MessageContext to simplify access MessageContext from CallbackHandler
Date Tue, 21 Dec 2010 12:14:01 GMT

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

Samisa Abeysinghe resolved RAMPART-69.
--------------------------------------

    Resolution: Duplicate

Same as https://issues.apache.org/jira/browse/RAMPART-65

> RampartReceiver should store current MessageContext to simplify access MessageContext
from CallbackHandler
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: RAMPART-69
>                 URL: https://issues.apache.org/jira/browse/RAMPART-69
>             Project: Rampart
>          Issue Type: Improvement
>          Components: rampart-core
>    Affects Versions: 1.3
>         Environment: all
>            Reporter: Bernhard Roider
>
> RampartReceiver should store current MessageContext to simplify access MessageContext
from CallbackHandler.
> This Feature is simple to implement and opens many ways to customise CallbackHandler
and TokenIssuer.
> Possible solution;
> public class RampartReceiver(..) {
> ...
>    RampartEngine engine = new RampartEngine();
>    Vector wsResult;
>    MessageContext oldCtx = MessageContext.getCurrentMessageContext();
>    try {
>             // save current MessageContext
>             MessageContext.setCurrentMessageContext(msgContext);
>             wsResult = engine.process(msgContext);
>             
>         } catch (WSSecurityException e) {
>             e.printStackTrace();
>             throw new AxisFault(e.getMessage(), e);
>         } catch (WSSPolicyException e) {
>             e.printStackTrace();
>             throw new AxisFault(e.getMessage(), e);
>         } catch (RampartException e) {
>             e.printStackTrace();
>             throw new AxisFault(e.getMessage(), e);
>         } finally {
>            // restore old MessageContext
>            MessageContext.setCurrentMessageContext(oldContext);
>         }
> P.S.: it would be better (for future Axis2 Version compatibility) if the RampartReceiver
extends AbstractHandler

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message