DataPower

 View Only
Expand all | Collapse all

Handling REST XML & JSON in response using gateway script & callprocessingrule

  • 1.  Handling REST XML & JSON in response using gateway script & callprocessingrule

    Posted Tue June 07, 2022 06:40 PM

    Hi - We have an MPGW where we are trying to support REST XML & JSON in response with non-xml as ResponseType in MPGW. So In Policy Response, we have 3 rules 1. accept everything , identify the message as XML or JSON or binary & call the corresponding sub rule using callprocessingrule with a context variable.

    2. Accept REST XML , do transformations & send to client 3. Accept JSON & send to client

    Issue: Incase of JSON, MPGW is sending the response as empty but in-case of XML to JSONx & JSONtoJSON conversion (XML rule) it works.

    We used the same context name for the output of XML & JSON response rule & provided that in the final result action in common response rule but not sure why it works for XML type but not for JSON response type. Please help.



    #DataPower
    #Support
    #SupportMigration


  • 2.  RE: Handling REST XML & JSON in response using gateway script & callprocessingrule

    Posted Wed June 08, 2022 07:12 AM

    It is difficult to say what is wrong without config. Please attach a small demo service export here for inspection.



    #DataPower
    #Support
    #SupportMigration