JBossWS client not sending session cookie
Issue
- We are building a Webservice client that requires us to first query out a "sessionId" then in each request afterwards we need to submit the sessionId in the HTTP header as a Cookie value.
- Our implementation using JBossWS:
EquipmentServiceSoap port = service.getEquipmentServiceSoap(); ((BindingProvider) port).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true); HttpCookie qAdminSession = new HttpCookie("Cookie", "QAdminSession=" + sessionId); ((BindingProvider) port).getRequestContext().put(MessageContext.HTTP_REQUEST_HEADERS, Collections.singletonMap("Cookie", Collections.singletonList(qAdminSession.toString()))); - When we capture the outbound XML, nothing is sent in the header of the JbossWS implantation.
Environment
- JBoss Enterprise Application Platform (EAP) 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.