API Connect

API Connect

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Custom SOAP Error Handling in XSLT with Switch and Throw Policy

    Posted Tue May 13, 2025 02:32 AM
    Edited by Kumar . Tue May 13, 2025 06:10 AM

    Dear Team,

    I have two conditions in my XSLT, and if either of them is met, I need to stop the assembly flow and generate an error message with a customized SOAP structure. However, since there are other policies configured in the assembly immediately after the XSLT, the flow continues to execute even when the error condition is met.

    Can this be handled using a Switch and Throw policy? The request type is SOAP.

    ------------------------------
    Kumar
    ------------------------------



  • 2.  RE: Custom SOAP Error Handling in XSLT with Switch and Throw Policy

    Posted Tue May 13, 2025 06:08 AM

    Dears,

    Could anyone tell me if what I've mentioned can be achieved, or suggest any alternative approaches if available to stop the assembly flow and throw customized soap message with error details?



    ------------------------------
    Kumar
    ------------------------------



  • 3.  RE: Custom SOAP Error Handling in XSLT with Switch and Throw Policy

    Posted Tue May 13, 2025 03:57 PM

    Hello Everyone,

    Can anyone help with your Inputs?



    ------------------------------
    Kumar
    ------------------------------



  • 4.  RE: Custom SOAP Error Handling in XSLT with Switch and Throw Policy

    Posted Tue May 13, 2025 07:15 PM

    Please post XSLT snippets so we can review them.



    ------------------------------
    Brendon Stephens
    ------------------------------



  • 5.  RE: Custom SOAP Error Handling in XSLT with Switch and Throw Policy

    Posted Wed May 14, 2025 02:30 AM
    Edited by Kumar . Wed May 14, 2025 04:04 PM

    Dear Brendon,

    Please find attached


    ------------------------------
    Kumar
    ------------------------------

    Attachment(s)

    txt
    validate.txt   3 KB 1 version
    js
    validate payload.js   3 KB 1 version


  • 6.  RE: Custom SOAP Error Handling in XSLT with Switch and Throw Policy

    Posted Wed May 14, 2025 04:44 AM
    Edited by Kumar . Wed May 14, 2025 03:32 PM

    Dears,

    Kindly any Inputs.



    ------------------------------
    Kumar
    ------------------------------



  • 7.  RE: Custom SOAP Error Handling in XSLT with Switch and Throw Policy

    Posted Wed May 14, 2025 12:04 PM
    Edited by Kumar . Wed May 14, 2025 03:31 PM

    Dears,

    Issue has been solved.

    ------------------------------
    Kumar
    ------------------------------