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.  SQL Datasource Output

    Posted 08/18/20 08:59 AM

    Dears,

    Am getting below output from SQL Datasource:

    <sql result="success">

    <parameter position="1" isNull="true"/>

    <parameter position="7">{"name":"dan","Surname":""}</parameter>

    </sql>

    My Expected output is json only:

    {

    "name":"dan",

    "Surname":""

    }

    please suggest how can i extract json.



    #DataPower
    #Support
    #SupportMigration


  • 2.  RE: SQL Datasource Output

    Posted 08/18/20 10:32 AM

    With this XPath:

    string(/sql/parameter[="7"])



    #DataPower
    #Support
    #SupportMigration


  • 3.  RE: SQL Datasource Output

    Posted 08/19/20 05:32 AM

    Dear Hermann,


    I am able to log the data now in error logs using below XSLT



    <xsl:template match="/">

    <xsl:variable name = "out"><xsl:value-of select="string(/db-results/sql/parameter[='7'])"/></xsl:variable>


    <xsl:message dp:type="all" dp:priority="error"><xsl:value-of select="string(/db-results/sql/parameter[='7'])"/></xsl:message>



    is it possible to print the json output in soapui, can you please help,

    i tried to set variable (json data)in header in xslt only and then i tried to read from gatewayscript its working but my arabic data is getting changed in output.


    can you help me to print the data in output immediately after XSLT...



    #DataPower
    #Support
    #SupportMigration


  • 4.  RE: SQL Datasource Output

    Posted 08/21/20 08:30 AM