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)

element is not declared error in AX 2012 R2 and BizTalk 2013

(1) ShareShare
ReportReport
Posted on by 390

Hi:

We continue getting “element is not declared” in BizTalk and AX.

Appreciate any help and hints.

Regards, Toraj

 

Background:

-          We have BizTalk 2013 and AX2012 R2.

 

-          From BizTalk Suspended Job

System.ServiceModel.FaultException: <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://schemas.microsoft.com/dynamics/2008/01/services/PurchaseInvoiceService/createAifFaultFault</a:Action><a:RelatesTo>urn:uuid:ddd18935-18a7-415d-bbbf-38e4b9a08bf7</a:RelatesTo><a:To s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/anonymous</a:To></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value></s:Code><s:Reason>

 

<s:Text xml:lang="en-US">Invalid document schema. The following error was returned: The 'http://schemas.microsoft.com/dynamics/2008/01/documents/PurchaseInvoice:LedgerJournalTable' element is not declared.</s:Text>

 

</s:Reason><s:Detail><AifFault xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Fault" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><CustomDetailXml i:nil="true"></CustomDetailXml><FaultMessageListArray i:nil="true"></FaultMessageListArray><InfologMessageList

 

-          From AX Exception Log

The 'http://schemas.microsoft.com/dynamics/2008/01/documents/PurchaseInvoice:LedgerJournalTable' element is not declared.

 

-          The BizTalk WCF-NetTcp > Configuration > Action as follows. Which matches the published WSDL

<BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<Operation Name="create" Action="http://schemas.microsoft.com/dynamics/2008/01/services/PurchaseInvoiceService/create" />

</BtsActionMapping>

 

-          The following is the XML from BizTalk to AX. I deleted some of the data to shorten the xml.

<ns1:PurchaseInvoice xmlns:ns1="http://schemas.microsoft.com/dynamics/2008/01/documents/PurchaseInvoice" xmlns:ns0="http://schemas.microsoft.com/dynamics/2008/01/sharedtypes">

<ns1:LedgerJournalTable class="entity" action="create">

 

      <ns1:_DocumentHash>45f5770e-0ee5-496c-a290-176a16e78b7c</ns1:_DocumentHash>

      <ns1:Approver>0</ns1:Approver>

      <ns1:BankAccountId>0</ns1:BankAccountId>

      <ns1:BankRemittanceType>None</ns1:BankRemittanceType>

      <ns1:CurrencyCode>USD</ns1:CurrencyCode>

      <ns1:CurrentOperationsTax>Current</ns1:CurrentOperationsTax>

      <ns1:CustVendNegInstProtestProcess>OpenPaym</ns1:CustVendNegInstProtestProcess>

      <ns1:DefaultDimension>

                  <ns0:Values><ns0:Value>

                  <ns0:Name></ns0:Name>

                  <ns0:Value>0</ns0:Value>

                  </ns0:Value></ns0:Values>

      </ns1:DefaultDimension>

      <ns1:DetailSummaryPosting>Detail</ns1:DetailSummaryPosting>

      <ns1:DocumentNum>P049368</ns1:DocumentNum>

      <ns1:EndBalance>0.00</ns1:EndBalance>

      <ns1:ExchRate>0.00</ns1:ExchRate>

      <ns1:ExchrateSecondary>0.00</ns1:ExchrateSecondary>

      <ns1:FixedExchRate>Yes</ns1:FixedExchRate>

      <ns1:FixedOffsetAccount>Yes</ns1:FixedOffsetAccount>

      <ns1:GroupBlockId>

      </ns1:GroupBlockId>

      <ns1:InUseBy></ns1:InUseBy>

      <ns1:JournalBalance>1573.91</ns1:JournalBalance>

      <ns1:JournalName>APINV</ns1:JournalName><ns1:JournalTotalDebit>1573.91</ns1:JournalTotalDebit>

 

      <ns1:LedgerJournalTrans class="entity">

                  <ns1:CurrencyCode>... LedgerJournalTrans Deleted for Simplicitsy </ns1:CurrencyCode>

      </ns1:LedgerJournalTrans>

 

      <ns1:DocuRefTable class="entity" />

      <ns1:LedgerJournalTable_W class="entity" />

</ns1:LedgerJournalTable>

</ns1:PurchaseInvoice>

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Denis Macchinetti Profile Picture
    16,444 on at

    Hi

    Take a look at social.msdn.microsoft.com/.../trouble-sending-messages-to-dynamics-ax-element-is-not-declared

    Hope this help you

  • Toraj Khavari Profile Picture
    390 on at

    Hi:

    After working on this off and on for a few weeks, I just posted the following Technical Blog / article for solution. Happy reading.

    BizTalk 2013 and AX2012 R2 Receive Services Interface - http://torajkhavari.blogspot.com/2015/01/title-biztalk2013-and-ax2012-r2-receive.html

    Regards, Toraj

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