You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Rj (JIRA)" <ji...@apache.org> on 2017/05/26 04:37:04 UTC
[jira] [Created] (CXF-7385) HttpServletRequest is coming as null in
CXF
Rj created CXF-7385:
-----------------------
Summary: 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)