CXF
  1. CXF
  2. CXF-4289

Coping Request SOAP Headers to Fault response

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.5, 2.7.2
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Hi,

      Actually JAXWSMethodInvoker and AbstractJAXWSMethodInvoker contain code to copy request soap headers (except security one) to SOAP Fault: AbstractJAXWSMethodInvoker.updateHeader().

      I see some use cases when it is not really desired:

      1) Request SOAP headers contains some labelling information about request elements and they make sense only with request
      2) Request SOAP headers extending request elements with meta-information

      If request headers are copied into fault response, they can be invalid in response context and cause undesired effects:

      a) it makes response processing on the client side more difficult, especially if processing interceptor is called before incoming fault message is recognized and placed into exchange.getInFaultMessage()
      b) response fault message has larger size

      Proposal is to define context property that give user the possibility to switch-off coping request headers into fault response.
      Patch is attached.

      Regards,
      Andrei.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        241d 2h 21m 1 Andrei Shakirin 02/Jan/13 12:17
        Resolved Resolved Closed Closed
        57d 5h 10m 1 Daniel Kulp 28/Feb/13 17:27
        Daniel Kulp made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Daniel Kulp made changes -
        Fix Version/s 2.6.5 [ 12323605 ]
        Fix Version/s 2.7.2 [ 12323604 ]
        Andrei Shakirin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Andrei Shakirin added a comment - - edited

        Headers aren't copied from inbound message as was described in issue, however AbstractJAXWSMethodInvoker.updateHeader() copies all headers already set into outbound context (except security ones) to Fault (method checks header directions and copies only INOUT and OUT).
        It makes sense to disable this behavior through property, because in some cases headers prepared for normal response should not be sent if fault occurs.

        Cheers,
        Andrei.

        Show
        Andrei Shakirin added a comment - - edited Headers aren't copied from inbound message as was described in issue, however AbstractJAXWSMethodInvoker.updateHeader() copies all headers already set into outbound context (except security ones) to Fault (method checks header directions and copies only INOUT and OUT). It makes sense to disable this behavior through property, because in some cases headers prepared for normal response should not be sent if fault occurs. Cheers, Andrei.
        Hide
        Ulhas Bhole added a comment -

        I will take a look into it and apply patch soon.

        Regards,

        Ulhas Bhole

        Show
        Ulhas Bhole added a comment - I will take a look into it and apply patch soon. Regards, Ulhas Bhole
        Ulhas Bhole made changes -
        Assignee Ulhas Bhole [ ulhasbhole ]
        Andrei Shakirin made changes -
        Field Original Value New Value
        Attachment JAXWSMethodInvoker.patch [ 12525766 ]
        Andrei Shakirin created issue -

          People

          • Assignee:
            Ulhas Bhole
            Reporter:
            Andrei Shakirin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development