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
Expand all | Collapse all

Gateway script url open with xml request and response

  • 1.  Gateway script url open with xml request and response

    Posted 09/08/20 06:33 AM

    Hi,

    How do we decalre the request data in the options while using url open in gateway script and the request data is stored in a variable called xmlrequest.

    Secondly should we use response.ReadasXML or Buffer to read the xml response?

    var options = { target: url, method: 'POST', contentType: 'application/xml', sslClientProfile: 'api-sslcli-all', timeout: 3, data: $xmlrequest?

    #DataPower
    #Support
    #SupportMigration


  • 2.  RE: Gateway script url open with xml request and response

    Posted 09/08/20 07:26 AM

    Hi,

    yes, you should put it to data parameter, without using $ character in front of your variable.

    And you can use either readAsXML or readAsBuffer, depending n the data and what do you want to it afterwards. Please see the knowledgecenter for more information:

    https://www.ibm.com/support/knowledgecenter/SS9H2Y_7.5.0/com.ibm.dp.doc/urlopen_js.html

    -Hermanni



    #DataPower
    #Support
    #SupportMigration