cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rj (JIRA)" <>
Subject [jira] [Created] (CXF-7385) HttpServletRequest is coming as null in CXF
Date Fri, 26 May 2017 04:37:04 GMT
Rj created CXF-7385:

             Summary: HttpServletRequest is coming as null in CXF
                 Key: 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();
BindingFactoryManager manager = sf.getBus().getExtension(BindingFactoryManager.class);
JAXRSBindingFactory factory = new JAXRSBindingFactory();
manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, factory);
CustomerService service = sf.create(CustomerService.class);
WebClient wc = sf.createWebClient();

This message was sent by Atlassian JIRA

View raw message