IBM Support

PK91543: THE HTTP_REQUEST_HEADERS PROPERTY IS NOT BEING HONORED WHEN SETTING A COOKIE.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The HTTP_REQUEST_HEADERS property is not being honored when
    setting a cookie.
    
    The JAX-WS API provides a mechanism for client applications to
    set and retrieve transport headers.  The client application is
    supposed to set the cookie value on the Map provided by the
    MessageContext.HTTP_REQUEST_HEADERS property.   The JAX-WS
    engine does not seem to be honoring this property.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server Feature    *
    *                  Pack for Web Services users of JAX-WS and   *
    *                  maintain session.                           *
    ****************************************************************
    * PROBLEM DESCRIPTION: The JAX-WS runtime is not honoring      *
    *                      the Cookie value set on the JAX-WS      *
    *                      HTTP_REQUEST_HEADERS property.          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The JAX-WS API provides a mechanism for client applications to
    set and retrieve transport headers.  The client application is
    supposed to set the cookie value on the Map provided by the
    MessageContext.HTTP_REQUEST_HEADERS property.   The JAX-WS
    engine does not seem to be honoring this property.
    
    The following sample code demonstrates how a client
    application may set the cookie value
    "testCookie=myCookie;PATH=myPath":
    
      BindingProvider proxy = ...
      String cookieValue = "testCookie=myCookie;PATH=myPath";
    
      // Access the request context properties from the proxy
      Map<String, Object> reqCtx =
           getRequestContext(proxy);
    
      // Enable sessions
      reqCtx.put(BindingProvider.SESSION_MAINTAIN_PROPERTY,true);
    
    
      // Get the request http transport headers map
      Map<String,List<String>> headersMap =
        (Map<String,List<String>>)
          reqCtx.get(MessageContext.HTTP_REQUEST_HEADERS);
    
      if (headersMap == null) {
        reqHttpHeader = new Hashtable<String,List<String>>();
      }
    
      // Set the cookie value
      List<String> cookies = (List<String>)
        headersMap.get("Cookie");
      if (cookies == null) {
        cookies = new ArrayList<String>();
      }
      cookies.add(cookieValue);
      headersMap.put("Cookie",
                     cookies);
    
      // Put the headers map on the context
      reqCtx.put(MessageContext.HTTP_REQUEST_HEADERS,
                 headersMap);
    

Problem conclusion

  • The JAX-WS runtime was not honoring the "Cookie" header set on
    the HTTP_REQUEST_HEADERS because the JAX-WS transport layer
    was not reading the HTTP_REQUEST_HEADERS map.  The JAX-WS
    transport layer is changed to read the map and access the
    cookie values.
    
    
    The fix for this APAR is currently targeted for inclusion in
    fix packs 6.1.0.29.
    Please refer to the Recommended Updates page for delivery
    information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK91543

  • Reported component name

    WEBSERVIC FEATU

  • Reported component ID

    5724J0850

  • Reported release

    610

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-07-16

  • Closed date

    2009-07-17

  • Last modified date

    2009-07-17

  • APAR is sysrouted FROM one or more of the following:

    PK82730

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBSERVIC FEATU

  • Fixed component ID

    5724J0850

Applicable component levels

  • R610 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
10 February 2022