Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-576

sentMessageTracingLogger skips request message headerer content

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.3, 1.5.8
    • Fix Version/s: 1.5.9
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Widnows XP, Websphere 6.1.0.19, SAAJ 1.3 (sun implementation), MTOM enabled JAXB2 marshaller.

      Description

      In org.springframework.ws.server.MessageDispatcher class sentMessageTracingLogger with trace level does not log the same request message as the one being logged by receivedMessageTracingLogger.
      I've noticed that request message having <SOAP-ENV:Header> with wss4j stuff is properly logged by receivedMessageTracingLogger on trace level:

      Received request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Header>
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1">
      <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-21398464">
      <wsse:Username>876543</wsse:Username>
      <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">a701050a4e03ef54319c319c9a06a895</wsse:Password>
      </wsse:UsernameToken>
      </wsse:Security>
      </SOAP-ENV:Header>
      <SOAP-ENV:Body>....</SOAP-ENV:Body></SOAP-ENV:Envelope>] 

      Unfortunately sentMessageTracingLogger strips out content of <SOAP-ENV:Header> when logging request message:

      Sent response [------=_Part_18_463346590.1255441172093
      Content-Type: application/xop+xml; type="text/xml"; charset=utf-8
       
      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <SOAP-ENV:Header/>
      <SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>
      ------=_Part_18_463346590.1255441172093--] for request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header>
      </SOAP-ENV:Header><SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>

      It seems that wss4j headers are processed by WSS4j Interceptor and then somehow removed from requestMessage. Actually had no time to dig it further and check if custom headres are also stripped out.
      Anyway i think that sentMessageTracingLogger should log original client request message.
      I am attaching patch version of MessageDispatcher

        Activity

        miluch Jakub Milkiewicz created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Description In org.springframework.ws.server.MessageDispatcher class sentMessageTracingLogger with trace level does not log the same request message as the one being logged by receivedMessageTracingLogger.
        I've noticed that request message having <SOAP-ENV:Header> with wss4j stuff is properly logged by receivedMessageTracingLogger on trace level:

        Received request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1"><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-21398464"><wsse:Username>876543</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">a701050a4e03ef54319c319c9a06a895</wsse:Password></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body>....</SOAP-ENV:Body></SOAP-ENV:Envelope>]

        Unfortunately sentMessageTracingLogger strips out content of <SOAP-ENV:Header> when logging request message:
        Sent response [------=_Part_18_463346590.1255441172093
        Content-Type: application/xop+xml; type="text/xml"; charset=utf-8

        <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>
        ------=_Part_18_463346590.1255441172093--] for request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header>
        </SOAP-ENV:Header><SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>

        It seems that wss4j headers are processed by WSS4j Interceptor and then somehow removed from requestMessage. Actually had no time to dig it further and check if custom headres are also stripped out.
        Anyway i think that sentMessageTracingLogger should log original client request message.
        I am attaching patch version of MessageDispatcher
        In org.springframework.ws.server.MessageDispatcher class sentMessageTracingLogger with trace level does not log the same request message as the one being logged by receivedMessageTracingLogger.
        I've noticed that request message having <SOAP-ENV:Header> with wss4j stuff is properly logged by receivedMessageTracingLogger on trace level:

        {noformat}
        Received request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1"><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-21398464"><wsse:Username>876543</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">a701050a4e03ef54319c319c9a06a895</wsse:Password></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body>....</SOAP-ENV:Body></SOAP-ENV:Envelope>]
        {noformat}

        Unfortunately sentMessageTracingLogger strips out content of <SOAP-ENV:Header> when logging request message:
        {noformat}
        Sent response [------=_Part_18_463346590.1255441172093
        Content-Type: application/xop+xml; type="text/xml"; charset=utf-8

        <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>
        ------=_Part_18_463346590.1255441172093--] for request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header>
        </SOAP-ENV:Header><SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>
        {noformat}

        It seems that wss4j headers are processed by WSS4j Interceptor and then somehow removed from requestMessage. Actually had no time to dig it further and check if custom headres are also stripped out.
        Anyway i think that sentMessageTracingLogger should log original client request message.
        I am attaching patch version of MessageDispatcher
        arjen.poutsma Arjen Poutsma made changes -
        Description In org.springframework.ws.server.MessageDispatcher class sentMessageTracingLogger with trace level does not log the same request message as the one being logged by receivedMessageTracingLogger.
        I've noticed that request message having <SOAP-ENV:Header> with wss4j stuff is properly logged by receivedMessageTracingLogger on trace level:

        {noformat}
        Received request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1"><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-21398464"><wsse:Username>876543</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">a701050a4e03ef54319c319c9a06a895</wsse:Password></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body>....</SOAP-ENV:Body></SOAP-ENV:Envelope>]
        {noformat}

        Unfortunately sentMessageTracingLogger strips out content of <SOAP-ENV:Header> when logging request message:
        {noformat}
        Sent response [------=_Part_18_463346590.1255441172093
        Content-Type: application/xop+xml; type="text/xml"; charset=utf-8

        <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>
        ------=_Part_18_463346590.1255441172093--] for request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header>
        </SOAP-ENV:Header><SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>
        {noformat}

        It seems that wss4j headers are processed by WSS4j Interceptor and then somehow removed from requestMessage. Actually had no time to dig it further and check if custom headres are also stripped out.
        Anyway i think that sentMessageTracingLogger should log original client request message.
        I am attaching patch version of MessageDispatcher
        In org.springframework.ws.server.MessageDispatcher class sentMessageTracingLogger with trace level does not log the same request message as the one being logged by receivedMessageTracingLogger.
        I've noticed that request message having <SOAP-ENV:Header> with wss4j stuff is properly logged by receivedMessageTracingLogger on trace level:

        {noformat}
        Received request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
        <SOAP-ENV:Header>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1">
        <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-21398464">
        <wsse:Username>876543</wsse:Username>
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">a701050a4e03ef54319c319c9a06a895</wsse:Password>
        </wsse:UsernameToken>
        </wsse:Security>
        </SOAP-ENV:Header>
        <SOAP-ENV:Body>....</SOAP-ENV:Body></SOAP-ENV:Envelope>]
        {noformat}

        Unfortunately sentMessageTracingLogger strips out content of <SOAP-ENV:Header> when logging request message:
        {noformat}
        Sent response [------=_Part_18_463346590.1255441172093
        Content-Type: application/xop+xml; type="text/xml"; charset=utf-8

        <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
        <SOAP-ENV:Header/>
        <SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>
        ------=_Part_18_463346590.1255441172093--] for request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header>
        </SOAP-ENV:Header><SOAP-ENV:Body>...</SOAP-ENV:Body></SOAP-ENV:Envelope>
        {noformat}

        It seems that wss4j headers are processed by WSS4j Interceptor and then somehow removed from requestMessage. Actually had no time to dig it further and check if custom headres are also stripped out.
        Anyway i think that sentMessageTracingLogger should log original client request message.
        I am attaching patch version of MessageDispatcher
        arjen.poutsma Arjen Poutsma made changes -
        Fix Version/s 1.5.9 [ 11296 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        arjen.poutsma Arjen Poutsma made changes -
        Remaining Estimate 0d [ 0 ]
        Time Spent 0.3h [ 1080 ]
        arjen.poutsma Arjen Poutsma made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            miluch Jakub Milkiewicz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0d
              0d
              Logged:
              Time Spent - 0.3h
              0.3h