cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7385) HttpServletRequest is coming as null in CXF
Date Fri, 26 May 2017 12:53:04 GMT

    [ https://issues.apache.org/jira/browse/CXF-7385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026242#comment-16026242
] 

Sergey Beryozkin commented on CXF-7385:
---------------------------------------

PRE_STREAM is for the out-going chain, most of the incoming phases will do on the server side...

> HttpServletRequest is coming as null in CXF
> -------------------------------------------
>
>                 Key: CXF-7385
>                 URL: https://issues.apache.org/jira/browse/CXF-7385
>             Project: CXF
>          Issue Type: Task
>            Reporter: Rj
>
> I am trying to get session id of each request and response while making client call to
maintain certain parameter internally for each request and its corresponding response.  
> I am trying to get HttpServletRequest  from CXF message from out interceptor as below.
> I am using Phase.PRE_STREAM in my constructor.
> public void handleMessage(Message msg) {
>     HttpServletRequest req = (HttpServletRequest)msg.get("HTTP.REQUEST");
> }
> I always get HttpServletRequest  as null.
> Do i need to set session id while creating client.I create my client as below
> JAXRSClientFactoryBean sf = new JAXRSClientFactoryBean();
> sf.setResourceClass(CustomerService.class);
> sf.setAddress("http://localhost:9000/");
> BindingFactoryManager manager = sf.getBus().getExtension(BindingFactoryManager.class);
> JAXRSBindingFactory factory = new JAXRSBindingFactory();
> factory.setBus(sf.getBus());
> manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, factory);
> CustomerService service = sf.create(CustomerService.class);
> WebClient wc = sf.createWebClient();



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message