Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14460

[GSS](7.1.z) LogicalMessageContext.get(MessageContext.HTTP_REQUEST_HEADERS) always returns null on client-side in JBoss EAP 7

    XMLWordPrintable

Details

    Description

      Below piece of code is a client-side JAX-WS LogicalHandler that adds some HTTP request headers:

      public boolean handleMessage(LogicalMessageContext context) {
        Boolean outbound = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
        if (outbound) {
          Map<String, List<String>> headers =
              (Map<String, List<String>>) context.get(MessageContext.HTTP_REQUEST_HEADERS);
          if (headers == null) {
            headers = new HashMap<String, List<String>>();
            context.put(MessageContext.HTTP_REQUEST_HEADERS, headers);
          }
          for (Map.Entry<String, String> entry : Tracer.getEntries().entrySet()) {
            headers.put(entry.getKey(), Collections.singletonList(entry.getValue()));
          }
        }
        return true;
      }
      

      This causes the "SOAPAction" HTTP header that is already set automatically by the JAX-WS runtime to be removed. The underlying issue seems to be that LogicalMessageContext.get(MessageContext.HTTP_REQUEST_HEADERS) always returns null on the client-side.

      Attachments

        Issue Links

          Activity

            People

              thofman Tomas Hofman
              rhn-support-sanaik Saisha Naik (Inactive)
              Daniel Cihak Daniel Cihak
              Daniel Cihak Daniel Cihak
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: