DataPower

DataPower

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.  MPG with content type x-www-form-urlencoded

    Posted Fri May 01, 2020 12:03 PM
    Hi!

    I am more or less new in DataPower, and I have to do a MPG with content type x-www-form-urlencoded. I try with Non-xml request, and test from postman but I can´t get the information correctly. Do you have an example or any information about how to configure my MPG?

    Thank you in advance! 
    Have a nice afternoon :)

    ------------------------------
    Angelica Ocampo
    ------------------------------


  • 2.  RE: MPG with content type x-www-form-urlencoded

    Posted Mon May 04, 2020 02:19 AM
    Hi,
    could you give a bit more details on what you are trying to achieve?

    ------------------------------
    Hermanni Pernaa
    ------------------------------



  • 3.  RE: MPG with content type x-www-form-urlencoded

    Posted Mon May 04, 2020 08:56 AM

    Hi Angelica ,

    By default, when you define your MPGW as having a non-XML request or response, the payload coming into the associated request or response rule will NOT be visible to any action except those that are defined as "binary" type actions, for example, a Convert HTTP action, GatewayScript, or Transform Binary.  Instead, the payload will be forwarded to your service's backend in addition to anything else you may write to the OUTPUT context.  Just from a historical perspective this was done most probably to protect XML specific actions (like a Transformation action) from getting an XML parse error on this non-XML data.  To enable this non-XML payload to be visible in your processing rules, you must update your specific request or response rule to enable "Non XML processing".  This is done by editing the rule from the Navigation of Objects -> XML Processing -> Processing Rules.  By doing this, you're effectively telling DataPower that you understand the rule will properly handle this payload and not cause any failures due to XML parse attempts.

    Regards,

    Steve