jax-ws
  1. jax-ws
  2. JAX_WS-457

Unable to set MIME headers through SAAJ API

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1
    • Fix Version/s: not determined
    • Component/s: handlers
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      Using the SAAJ 1.3 implementation, i am trying to set a MIME header from a handler:

      SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
      MimeHeaders mimeHeaders = soapMessage.getMimeHeaders();
      mimeHeaders.setHeader("Cookie", "client-cookie=true");

      However the wireformat doesn't contain it:

      POST /jaxws-samples-handlerchain HTTP/1.1
      SOAPAction: ""
      Content-Type: text/xml; charset=utf-8
      Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2,
      /; q=.2
      User-Agent: Java/1.5.0_11
      Host: localhost:8080
      Connection: keep-alive
      Content-Length: 539

      <?xml version="1.0" ?>
      <S:Envelope/>[...]</S:Envelope>

      The same code works with a different SAAJ implementation

        Activity

        Hide
        heiko_braun added a comment -
        Show
        heiko_braun added a comment - Cross reference: http://jira.jboss.com/jira/browse/JBWS-1671
        Hide
        jitu added a comment -

        Assigning to Rama

        Show
        jitu added a comment - Assigning to Rama
        Hide
        ramapulavarthi added a comment -

        changing the target milestone to ND.

        Show
        ramapulavarthi added a comment - changing the target milestone to ND.
        Hide
        ramapulavarthi added a comment -

        not a showstopper for as911

        Show
        ramapulavarthi added a comment - not a showstopper for as911
        Hide
        ramapulavarthi added a comment -

        Targeting it to 2.2.1 release.
        The fix involves changing the code at multiple places for it to be correct and applicable in all possible
        cases beyond this test case covers.

        Notes for myself for future evaluation:
        -------------------------------------------------------------------------
        Look into Packet.INBOUND_TRANSPORT_HEADERS and Packet.OUTBOUND_TRANSPORT_HEADERS
        Message.readAsSOAPMessage(Packet packet, boolean inbound)

        Wherever we create Packet from SOAPMessage or SOAPMessage from Packet, we need to take of the
        respective properties.
        In SOAPMessageDispatch, the above packet proeprties should be taken care of.

        Also, While creating the HttpConnection in HttpTransportPipe,
        Packet.OUTBOUND_TRANSPORT_HEADERS needs to be sent adn Packet.INBOUND_TRANSPORT_HEADERS
        need to be populatyed for response.

        Similarly with Provider<SOAPMessage> implementation.

        In Handlers, where user can access/set SOAPMessage.

        What about Tubes that can set new Message instance? Should n't Packet properties be already updated
        when a message is set on packet based on the direction?

        Show
        ramapulavarthi added a comment - Targeting it to 2.2.1 release. The fix involves changing the code at multiple places for it to be correct and applicable in all possible cases beyond this test case covers. Notes for myself for future evaluation: ------------------------------------------------------------------------- Look into Packet.INBOUND_TRANSPORT_HEADERS and Packet.OUTBOUND_TRANSPORT_HEADERS Message.readAsSOAPMessage(Packet packet, boolean inbound) Wherever we create Packet from SOAPMessage or SOAPMessage from Packet, we need to take of the respective properties. In SOAPMessageDispatch, the above packet proeprties should be taken care of. Also, While creating the HttpConnection in HttpTransportPipe, Packet.OUTBOUND_TRANSPORT_HEADERS needs to be sent adn Packet.INBOUND_TRANSPORT_HEADERS need to be populatyed for response. Similarly with Provider<SOAPMessage> implementation. In Handlers, where user can access/set SOAPMessage. What about Tubes that can set new Message instance? Should n't Packet properties be already updated when a message is set on packet based on the direction?
        Hide
        ramapulavarthi added a comment -

        See earlier evaluation, Adding keyword metro2.0-waived.

        Show
        ramapulavarthi added a comment - See earlier evaluation, Adding keyword metro2.0-waived.
        Hide
        ramapulavarthi added a comment -

        Can't make it for this release 2.2.2

        Show
        ramapulavarthi added a comment - Can't make it for this release 2.2.2

          People

          • Assignee:
            miroslav.kos
            Reporter:
            heiko_braun
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: