web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Generating XML document from AX 2012 and sending through SFTP

(0) ShareShare
ReportReport
Posted on by 800

Hi

Can someone suggest me the better way to approach for below requirement?

We need to send vendor payments/other data to 3rd party application using SFTP channel. Third party application will accept XML formats and below are the versions.

  1. XML V2
  2. XML V3

Generating XML by using XmlDocument classes or generating XML data file using AIF.(I think we need transformation to get right XML file).

Or any other way to generate XML document.

Thanks in advance for your time and help on the same.

Regards,

KVNKK

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,231 Super User 2025 Season 2 on at

    Hi KVNKK,

    There is not a real recommendation to go for option 1 (XmlDocument) or 2 (AIF and XSLT). You can choose the one which is most comfortable for you.

    Note that AIF has been depreciated in Dynamics 365 and have been replaced with Data Management features.  

  • kvnkk Profile Picture
    800 on at

    Thanks for the replay.

    In case of AIF we need to write Transformation to convert XSLT to XML.. or do we have any other option.

  • kvnkk Profile Picture
    800 on at

    Hi,

    We are able to generate Xml file using  XmlDocument  classes (for salary and vend payments etc..)

    Now our challenge is to send these files for payment to bank using SFTP channel. (Bank shared the credential and link)

    This is first time we are working on Automatic SFTP  File transfer, Can some one suggest me how we can achieve it using X++ and any code snippet will be more help full. Thanks.

  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    You can look at the discussion we had in this forum in File transfer between Ax and SFTP server.

  • kvnkk Profile Picture
    800 on at

    Hi Martin,

    We have created a class library by using WinScp .net Assembly and we are able to connect SFTP server and also able to upload/ download the files through C# code.

    Later we have copied the .DLL (class library) at AX server side in bin folder as we would like to run at server side in batch process and added in AX reference node and registered at GAC.

    But when we are trying to run by using X++ job it’s not get connecting to SFTP server.

    Even we have tried by copying .DLL at AX client bin folder.

     Even though no success. Did we missed anything over here??

    Restarted AOS and done IIS reset as well.

    Regards,

    KVNKK

  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Sorry, "it’s not get connecting" isn't a very detailed description of the observed behavior, which makes identifying your problem pretty complicated.

    But I've noticed that you mentioned installing only your class library and not WinSCP .NET (and its prerequisites, if needed). This is likely the problem; your library depends on the other library, which does exist in your environment and therefore your library can't be loaded.

    Whether it should be installed on client or server depends on whether you'll call it on client or server; I assume you want it on server. Jobs always runs on client, but they can call server-bound classes and methods. Note that compilation happens on client, therefore you may need the assembly there just for compilation purpose.

    Also note that if you added the Visual Studio project to AOT, AX would deploy the .dll automatically for you (unfortunately handling the references requires extra effort).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans