Topic
  • 2 replies
  • Latest Post - ‏2019-08-20T07:01:57Z by VenkySeenivasagan
VenkySeenivasagan
VenkySeenivasagan
2 Posts

Pinned topic How to integrate MQ FSH to SFTP backend in datapower?

‏2019-08-19T08:04:06Z | datapower ibm

Hi Team,

 

I have created the MQ FSH handler . I am sending to SFTP backend.

Issue: I am getting message from MQ but i need to write this content to file and place it into the sftp. How can i achieve this?

 

The way I tried in the processing policy,

Transform action : INPUT, xslt: var://service/routing-url'" value="' sftp://uN:PW@servername:22/filepath/'" /> 

 

Note:

I have tried SFTP to SFTP  and SFTP to MQ it is working. The issue with MQ to SFTP.

  • AugustZ
    AugustZ
    202 Posts
    ACCEPTED ANSWER

    Re: How to integrate MQ FSH to SFTP backend in datapower?

    ‏2019-08-19T12:26:44Z  

    So your routing-url is setting path so far. 

    Note that you also need to set/include a filename, that seems to miss from what you provided so far. 

    Perhaps you extract it from the source details or you randomly generate one?

  • AugustZ
    AugustZ
    202 Posts

    Re: How to integrate MQ FSH to SFTP backend in datapower?

    ‏2019-08-19T12:26:44Z  

    So your routing-url is setting path so far. 

    Note that you also need to set/include a filename, that seems to miss from what you provided so far. 

    Perhaps you extract it from the source details or you randomly generate one?

  • VenkySeenivasagan
    VenkySeenivasagan
    2 Posts

    Re: How to integrate MQ FSH to SFTP backend in datapower?

    ‏2019-08-20T07:01:57Z  
    • AugustZ
    • ‏2019-08-19T12:26:44Z

    So your routing-url is setting path so far. 

    Note that you also need to set/include a filename, that seems to miss from what you provided so far. 

    Perhaps you extract it from the source details or you randomly generate one?

    Hi AugustZ,

     

    Thanks for your response.It is working fine.

    Logic: 

    I placed the messages in MQ and used the below logic,It reached the SFTP filepath with the specified filename which contains the content of MQ messages.

     

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dp="http://www.datapower.com/extensions" xmlns:regexp="http://exslt.org/regular-expressions" extension-element-prefixes="dp regexp" exclude-result-prefixes="dp regexp" version="2.0">
       <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
       <xsl:template match="/">
          <xsl:variable name="Filename2" select="'MyLogic.xml'" />
          <xsl:variable name="BacksideFTP" select="concat('sftp://UN:PW@Hostname:port/filepath/',$Filename2)" />
          <dp:set-variable name="'var://service/routing-url'" value="$BacksideFTP" />
          <xsl:copy-of select="*" />
       </xsl:template>
    </xsl:stylesheet>

    Updated on 2019-08-20T07:08:31Z at 2019-08-20T07:08:31Z by VenkySeenivasagan