You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Mika Tapanainen <mi...@digia.com> on 2012/04/02 11:45:31 UTC

The common context between UsernameTokenValidator and SOAPHandler?

Hello,

My CustomUsernameTokenValidator (extends
org.apache.ws.security.validate.UsernameTokenValidator) does UsernameToken
authentication. After that the MySOAPHandler (extends
javax.xml.ws.handler.soap.SOAPHandler) is executed. 

How to pass the information (the custom session class) from the
CustomUsernameTokenValidator to the MySOAPHandler? Is there for example any
relationship between org.apache.ws.security.handler.RequestData and
javax.xml.ws.handler.soap.SOAPMessageContext? 

The RequestData has the method getMsgContext, which return java.lang.Object
and it seems that it has nothing to do with the
javax.xml.ws.handler.MessageContext??

BR,

Mika

--
View this message in context: http://cxf.547215.n5.nabble.com/The-common-context-between-UsernameTokenValidator-and-SOAPHandler-tp5611957p5611957.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: The common context between UsernameTokenValidator and SOAPHandler?

Posted by Mika Tapanainen <mi...@digia.com>.
Thanks,

I tested this and it works.

BR,

Mika

--
View this message in context: http://cxf.547215.n5.nabble.com/The-common-context-between-UsernameTokenValidator-and-SOAPHandler-tp5611957p5614465.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: The common context between UsernameTokenValidator and SOAPHandler?

Posted by Colm O hEigeartaigh <co...@apache.org>.
How is your endpoint configured? Could you supply a test-case to reproduce
the problem?

Colm.

On Fri, Mar 1, 2013 at 6:19 AM, xtreamforce <pr...@mastek.com> wrote:

> Mike
>
> RequestData.getMsgContext() returns null in my case.  I use CXF2.7.3 . Any
> clue why?
>
>
> Regards
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/The-common-context-between-UsernameTokenValidator-and-SOAPHandler-tp5611957p5723912.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: The common context between UsernameTokenValidator and SOAPHandler?

Posted by xtreamforce <pr...@mastek.com>.
Mike 

RequestData.getMsgContext() returns null in my case.  I use CXF2.7.3 . Any
clue why?


Regards




--
View this message in context: http://cxf.547215.n5.nabble.com/The-common-context-between-UsernameTokenValidator-and-SOAPHandler-tp5611957p5723912.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: The common context between UsernameTokenValidator and SOAPHandler?

Posted by Daniel Kulp <dk...@apache.org>.
On Monday, April 02, 2012 02:45:31 AM Mika Tapanainen wrote:
> Hello,
> 
> My CustomUsernameTokenValidator (extends
> org.apache.ws.security.validate.UsernameTokenValidator) does UsernameToken
> authentication. After that the MySOAPHandler (extends
> javax.xml.ws.handler.soap.SOAPHandler) is executed.
> 
> How to pass the information (the custom session class) from the
> CustomUsernameTokenValidator to the MySOAPHandler? Is there for example
> any relationship between org.apache.ws.security.handler.RequestData and
> javax.xml.ws.handler.soap.SOAPMessageContext?
>
> The RequestData has the method getMsgContext, which return
> java.lang.Object and it seems that it has nothing to do with the
> javax.xml.ws.handler.MessageContext??

The RequestData.getMessagContext() would be an instance of CXF's Message 
class.    You can set properties on there all you want.   

Then, the SOAPMessageContext passed to the handler is a wrapper around the 
same Message. You should be able to retrieve your value via the normal get 
methods.

Dan



> 
> BR,
> 
> Mika
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/The-common-context-between-UsernameTokenV
> alidator-and-SOAPHandler-tp5611957p5611957.html Sent from the cxf-user
> mailing list archive at Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com