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.  Help to write to xml file in datapower

    Posted 04/14/26 08:50 AM

    Hi,

    I am trying to update xml file in datapower using xslt or Gateway script.

    <xsl:variable name="Data">
    <Store>
    <access>
    Test Data
    </access>
    </TokenStore>
    </xsl:variable>
    <dp:set-local-file name="'local:///token.xml'">
    <xsl:copy-of select="$Data"/>
    </dp:set-local-file>
    Can someone suggest how to update xml


    ------------------------------
    Sai Thota
    ------------------------------


  • 2.  RE: Help to write to xml file in datapower

    Posted 04/14/26 09:25 AM

    afik you can't write directly to the store or local directory with xslt/gwscript, only to the temporary directory. 
    dirty workaround can be done via soma/roma call from within xslt/gwscript.



    ------------------------------
    Jeroen Willems
    Integration Architect - Managing Partner
    Integration Designers
    ------------------------------



  • 3.  RE: Help to write to xml file in datapower

    Posted 04/14/26 10:44 AM

    I tried 

      <dp:soap-call
          target="https://<<IPAddress:5550/service/mgmt/current"
          username="uname"
          password="pwd">
     
        <env:Envelope>
          <env:Body>
            <mgmt:request domain="default">
              <mgmt:set-file name="local:///token.xml">
                <TokenStore>
                  <access_token>SOMA_TEST_OK</access_token>
                </TokenStore>
              </mgmt:set-file>
            </mgmt:request>
          </env:Body>
        </env:Envelope>
     
      </dp:soap-call>

    this snippet to make a call but i don't see it making the call.Could you please help me with a sample



    ------------------------------
    Sai Thota
    ------------------------------



  • 4.  RE: Help to write to xml file in datapower

    Posted 04/14/26 02:37 PM

    If this is related to your question about token caching, this is a really bad idea due to filesystem space limitations.  If you have a RAID, you're much better off for a number of reasons, the main one being more space.

    However, to answer this question, the above content must be Base64 encoded.



    ------------------------------
    Joseph Morgan
    CEO - Independent
    ------------------------------