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

          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