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)

SEPA XML payment error in namespace

(0) ShareShare
ReportReport
Posted on by 1,435

Hello everyone,

We use AX2012 R1 CU2, including hotfix KB2769783 for SEPA. In Europe everyone is switching to SEPA payment method. We set everything up, make a batch of payments and make an XML file to send payments to our bank.

Our bank checked the file today (Deutsche Bank) and they told me our namespace is corrupt and their software crashes on this.

Our standard AX 2012 namespace looks like this:

[quote]

<?xml version="1.0" encoding="UTF-8"?><Envelope xmlns="schemas.microsoft.com/.../Message"><Header><MessageId>

[/quote]

The software crashes on the "Envelope" part. It says:

[quote]

Unexpected root element "Envelope" from namespace "schemas.microsoft.com/.../Message"

[/quote]

The bank tells me this is an accepted namespace:

[quote]

<?xml version="1.0" encoding="UTF-8"?><Document xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03">

[/quote]

Anyone an idea what I have to do to get it working? Can I change the xml namespace somewhere ? It is AX generated, so I should probably change it somewhere in AX.

*This post is locked for comments

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

    Hi Willem,

    I can recall this problem. You have an xml file including an "AX envelope". The envelope is causing the error.

    Can you look for a hotfix? I can look tomorrow at our customer where we had the same problem. It is solved somehow...

  • Wvduren Profile Picture
    1,435 on at

    Hello André. I cannot find a hotfix for this specific issue. If you have time it would be great if you can check what the solution was for me. Would help me out!

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Willem,

    There are two transformation xslt files in AX. One for transforming to SEPA XML and one for truncating the envelope.

    You can find the truncate xslt in the resources node of your AOT. It is called 'VendPayments_SEPATruncateTags_xslt".

    Did you use this one in the outbound port itself as Outbound transformation?

    This should do the trick.

  • Wvduren Profile Picture
    1,435 on at

    Hi Andre. Thank you for your help. I will try it monday. I used VendPayments_SEPACreditTransfer_xslt in the examples above. Hope your tip helps. I remove the current port and replace it by your suggestion.

    Update:

    When I remove the outbound port and create a new one I get the following error:

     

    "Cannot create a record in XSLT repository table (AifXsltRepository). XSLT ID: SEPACreditTransfer. The record already exists."

     

    Can I just give it a new name? Or how can I fully remove the old entry? I am a little bit carefull in editing table content directly.

    Kind regards, Willem.

  • Wvduren Profile Picture
    1,435 on at

    Hello Andre!

    I just used your mentioned file. The envelope is still the same:

    [quote]

    <?xml version="1.0" encoding="UTF-8" ?>

    - <Envelope xmlns="schemas.microsoft.com/.../Message">

    [/quote]

    Any clue ? Maybe I need another hotfix ?

  • Wvduren Profile Picture
    1,435 on at

    I did some additional research. Some basic settings were not set:

    Accounts payable > Setup > Payment > Methods of payment

    If I look at the list of Export formats, "SEPA ISO20022 CredTrans" is not mentioned. This will probably be the problem.

    As I mentioned before, I already installed hotfix KB2769783. Anyone an idea what to try?

    Under the setup button there are two options for SEPA: ISO20022 CredTrans BE + ISO20022 CredTrans FI, but not NL 

  • Wvduren Profile Picture
    1,435 on at

    Ok, So I used SEPATruncage tags for post processing (André really helped me out here!). . Envelope was indeed removed and the error on the envelope was resolved.

    Now the story continues. The bank does not accept "Byte Order Marks". So I need to truncate BOM as well. So I searched for a way to truncate BOM. I managed to extract SEPATruncateTagsAndBOM.xsl from a hotfix for Italy and Finland. SO I used this one to post-process the XML file. Unfortunately, still Byte order marks in the file.

    The contents of TruncateTags.xsl:

    [quote]

    <?xml version="1.0" encoding="utf-8"?>

    <xsl:stylesheet xmlns:xsl="www.w3.org/.../Transform" xmlns:wt="schemas.microsoft.com/.../Message" version="1.0">  

     <!--Copy all nodes from source-->

     <xsl:template match="@*|node()">

       <xsl:copy>

         <xsl:apply-templates select="@* | node()"/>

       </xsl:copy>

     </xsl:template>

    <!--Remove header, message parts, body and envelope tags-->

     <xsl:template match="wt:Envelope/wt:Header">

     </xsl:template>

     <xsl:template match="wt:Envelope/wt:Body/wt:MessageParts">

       <xsl:apply-templates/>

     </xsl:template>

     <xsl:template match="wt:Envelope/wt:Body">

       <xsl:apply-templates/>

     </xsl:template>

     <xsl:template match="wt:Envelope">

       <xsl:apply-templates/>

     </xsl:template>

    </xsl:stylesheet>

    [/quote]

    The content of SEPATruncateTagsAndBOM.xsl:

    [quote]

    <?xml version="1.0" encoding="utf-8"?>

    <xsl:stylesheet xmlns:xsl="www.w3.org/.../Transform"

                   xmlns:wt="schemas.microsoft.com/.../Message"

                   xmlns:s1="schemas.microsoft.com/.../VendPayments"

                   version="1.0">

     <xsl:output method="xml" encoding="iso-8859-1" />

     <!--Copy all nodes from source-->

     <xsl:template match="/">

       <xsl:text disable-output-escaping="yes"><?xml version="1.0" encoding="utf-8"?></xsl:text>

       <xsl:copy-of select="wt:Envelope/wt:Body/wt:MessageParts/*" />

     </xsl:template>

    </xsl:stylesheet>

    [/quote]

    Maybe I can make a custom XSL ? If I get rid of the Byte Order Marks our bank is happy, and so am I :)

    Kind regards, Willem.

  • Community Member Profile Picture
    on at

    Hi Willem,

    this tread helped me a lot, and if you still need a solution to your last problem (BOM), with the last SEPA HF (KB2851350 + KB2880634) there is an other xsl in resources: VendPayments_SEPATruncateTagsAndBOM_xslt

    Kind regards,

    Adam

  • Sanogo Mohamed Profile Picture
    85 on at

    Hey Willem,

    We use AX2012 R2 CU6, including hotfix KB2850972 for SEPA. We set everything up, use the two transformation xslt files in AX: 'VendPayments_SEPACreditTransfer_03_xsl' and  'VendPayments_SEPATruncateTags_xslt'. But we have a missing element root when we want to truncate the envelope of our sepa xml file during the post processing.

    can you help us ?

    Kind regards, Mohamed

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
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans