Cookies 当Cookie';s使用上下文设置

Cookies 当Cookie';s使用上下文设置,cookies,jax-ws,Cookies,Jax Ws,我试图使用下面的代码片段从客户端设置cookie,我使用的是JAXWSRI2.2.3 Map<String, Object> ctxt = ((BindingProvider) portType).getRequestContext(); Map<String, List<String>> httpHeaders = new HashMap<String, List<String>>(); httpHeaders.put("Conten

我试图使用下面的代码片段从客户端设置cookie,我使用的是JAXWSRI2.2.3

Map<String, Object> ctxt = ((BindingProvider) portType).getRequestContext();
Map<String, List<String>> httpHeaders = new HashMap<String, List<String>>();
httpHeaders.put("Content-Encoding", Collections.singletonList("gzip"));
httpHeaders.put("Cookie", Collections.singletonList(cookie));
ctxt.put(MessageContext.HTTP_REQUEST_HEADERS, httpHeaders);
Map ctxt=((BindingProvider)portType).getRequestContext();
Map httpHeaders=newhashmap();
httpHeaders.put(“内容编码”,Collections.singletonList(“gzip”);
httpHeaders.put(“Cookie”,Collections.singletonList(Cookie));
put(MessageContext.HTTP_请求_头,httpHeaders);
从SOAP日志中,我看到Cookie没有被设置,但它是在上下文头中设置的。 除了Cookie,其他任何标题都已设置,我无法找到原因。 我需要从一个服务获取一个会话,并将其设置到另一个服务以使用它,但我无法在这里这样做

HTTP头:{Cookie=[mysession=“529fc605-8188-7f3b-21ad-92407976d5a9”;],接受编码=[gzip],内容编码=[gzip]}


---[HTTP请求-https://10.112.83.155:443/eam/sdk/]---接受:text/xml,多部分/相关接受编码:gzip内容编码:gzip内容类型:text/xml;charset=utf-8[]Set Cookie:vmware_soap_session=“529fc605-8188-7f3b-21ad-92407976d5a9”;SOAPAction:“urn:internaleam/2.0”用户代理:JAX-WSRI 2.2.3-b01-

这是JAX-WS中的一个bug。错误链接:

目前已在JAX-WS2.2.7中修复,尚未发布