Layer7 API Management

Expand all | Collapse all

How to transform from application/x-www-form-urlencoded to application/xml ?

  • 1.  How to transform from application/x-www-form-urlencoded to application/xml ?

    Posted Apr 30, 2015 09:30 PM

    Any idea on how to transform an incoming REST  request having content type - application/x-www-form-urlencoded to application/xml ?

     

    Below is a sample mesg -

     

    xml = <?xml version="1.0" encoding="ISO-8859-1"?><eventNotifications><bulkMoNotification><transactionId>3593809215685600794</transactionId><triggerId>138887</triggerId><trigger>[CATCH_ALL]</trigger><message>1</message><date>2015-04-15 12:44:55</date><phoneNumber>+19541234567</phoneNumber><carrierId>30</carrierId><carrierName>Verizon Wireless</carrierName><shortCode>34343</shortCode></bulkMoNotification></eventNotifications>



  • 2.  Re: How to transform from application/x-www-form-urlencoded to application/xml ?

    Posted May 01, 2015 11:52 PM

    Do you have a corresponding sample of the URL that is to be transformed?

     

    You would probably move the URL parameters into context variables, then build the XML from there.