Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-11270

Set cxf headers while throwing a soap fault

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.5-ER1
    • jboss-fuse-6.3
    • Camel
    • None
    • Fuse 7.5 Sprint 51 - Dev #2

      I'm using camel-cx and trying to get exchange headers(which I'm passing at request) while setting soap fault in body,

      If I'm getting 200 response and getting the required output, in that case, I'm getting Header which I have set in input like

      Headers: {myHeader=[testData]}
      

      But when I produce soap fault in that case, I'm getting empty Header, like below

      Response-Code: 500n  | Encoding: UTF-8n  | Content-Type: application/soap+xmln  | Headers: {}n  | Payload: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Receiver</soap:Value><soap:Subcode><soap:Value xmlns:ns1="http://cxf.apache.org/faultcode">ns1:007</soap:Value></soap:Subcode></soap:Code><soap:Reason><soap:Text xml:lang="en"></soap:Text></soap:Reason></soap:Fault></soap:Body></soap:Envelope>n
      

      I tried using soap 1.1 and 1.2 definitions but didn't get any success,

      I tried with a custom interceptor in which I'm setting a custom header and it's working fine,

       Map<String, String> headers = (Map<String, String>) message.get(Message.PROTOCOL_HEADERS);
              headers.put("myHeader", customHeaders);
      

      However, I'm trying headers which I'm passing at the request,

      Please find reproducer and test case,

        1. SoapExample.zip
          71 kB
        2. testCases
          3 kB

            yfang@redhat.com Freeman(Yue) Fang
            chardahe@redhat.com Chandrakant Hardahe (Inactive)
            Viliam Kasala Viliam Kasala
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: