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)

Invalid Message schema error AIF In Bound Ax2012

(0) ShareShare
ReportReport
Posted on by

Hi,

I have written xml according XSD. i have matched each node of XSD to xml. whenever I try to import using Inbound AIF it's arise Invalid Message schema error.

Regards,

*This post is locked for comments

I have the same question (0)
  • Douglas Noel Profile Picture
    3,905 on at

    Hi,

    which XSD you are speaking of? The general Dynamics Ax AIF Frame part (which is always required) or the wrapped massage part XSD.

    Do you hace defines some inbound transformations?

    Can you please give us some more info so we're able to assist you.

    regards

    Douglas.

  • Aijaz Profile Picture
    on at

    Hi Douglas,

    Thanks for reply. I have get XSD from Police of inboud here is my XSD

    My Customize XSD genrated from polices:

    *****************************************************************************************

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

    <xs:schema xmlns:tns="schemas.microsoft.com/.../SalesPackingSlip&quot; xmlns:st="schemas.microsoft.com/.../sharedtypes&quot; elementFormDefault="qualified" targetNamespace="schemas.microsoft.com/.../SalesPackingSlip&quot; xmlns:xs="www.w3.org/.../XMLSchema&quot;>

     <xs:import schemaLocation="SharedTypes.xsd" namespace="schemas.microsoft.com/.../sharedtypes&quot; />

     <xs:element name="SalesPackingSlip" type="tns:AxdSalesPackingSlip" />

     <xs:complexType name="AxdSalesPackingSlip">

       <xs:sequence>

         <xs:element minOccurs="0" maxOccurs="unbounded" name="SalesParmTable" type="tns:AxdEntity_SalesParmTable" />

       </xs:sequence>

     </xs:complexType>

     <xs:complexType name="AxdEntity_SalesParmTable">

       <xs:sequence>

         <xs:element minOccurs="1" name="ParmId" type="st:AxdExtType_ParmId" />

         <xs:element minOccurs="1" name="SalesId" type="st:AxdExtType_SalesId" />

         <xs:element minOccurs="0" maxOccurs="unbounded" name="SalesShippingStat" type="tns:AxdEntity_SalesShippingStat" />

         <xs:element minOccurs="0" maxOccurs="unbounded" name="SalesParmLine" type="tns:AxdEntity_SalesParmLine" />

       </xs:sequence>

       <xs:attribute fixed="entity" name="class" use="required" />

       <xs:attribute name="action" type="st:AxdEnum_AxdEntityAction" />

     </xs:complexType>

     <xs:complexType name="AxdEntity_SalesShippingStat">

       <xs:sequence>

         <xs:element minOccurs="1" name="SalesId" type="st:AxdExtType_SalesId" />

         <xs:element minOccurs="0" name="PackingSlipId" nillable="true" type="st:AxdExtType_PackingSlipId" />

         <xs:element minOccurs="1" name="Quantity" type="st:AxdExtType_InventQty" />

       </xs:sequence>

       <xs:attribute fixed="entity" name="class" use="required" />

       <xs:attribute name="action" type="st:AxdEnum_AxdEntityAction" />

     </xs:complexType>

     <xs:complexType name="AxdEntity_SalesParmLine">

       <xs:sequence>

         <xs:element minOccurs="1" name="InventTransId" type="st:AxdExtType_TradeInventTransId" />

         <xs:element minOccurs="0" name="ItemId" nillable="true" type="st:AxdUnion_AxdExtType_ItemId_AxdType_ExtCodeValue" />

         <xs:element minOccurs="1" name="ParmId" type="st:AxdExtType_ParmId" />

         <xs:element minOccurs="0" name="SalesLineRecId" nillable="true" type="st:AxdExtType_SalesLineRefRecId" />

       </xs:sequence>

       <xs:attribute fixed="entity" name="class" use="required" />

       <xs:attribute name="action" type="st:AxdEnum_AxdEntityAction" />

     </xs:complexType>

    </xs:schema>

    ***************************************************

    Here is XML from Above XSD.

    ***************************************

    <Envelope xmlns="schemas.microsoft.com/.../Message&quot;>

       <Header>

           <MessageId>{8F0DD3FE-D824-4DC9-87D5-D05152851346}</MessageId>

    <Action>schemas.microsoft.com/.../create&lt;/Action>

       </Header>

       <Body>

           <MessageParts xmlns="schemas.microsoft.com/.../Message&quot;>

           <SalesPackingSlip xmlns="schemas.microsoft.com/.../SalesPackingSlip&quot; xmlns:st="schemas.microsoft.com/.../sharedtypes&quot;>

           <SalesParmTable class="entity">

               <ParmId>922051</ParmId>

               <SalesId>1013405</SalesId>

    <SalesShippingStat class="entity" xmlns:xsi="www.w3.org/.../XMLSchema-instance&quot;>        

               <SalesId>1013405</SalesId>

    <PackingSlipId>20150318</PackingSlipId>

    <Quantity>2</Quantity>

           </SalesShippingStat>    

           <SalesParmLine class="entity" xmlns:xsi="www.w3.org/.../XMLSchema-instance&quot;>    

    <InventTransId>00378386</InventTransId>

    <ItemId>XYZ </ItemId>

    <ParmId>922051</ParmId>

    <SalesLineRecId>5637258320</SalesLineRecId>

           </SalesParmLine>      

           </SalesParmTable>  

           </SalesPackingSlip>

           </MessageParts>

       </Body>

    </Envelope>

    ********************************

    Please check above where is my xml wrong according to XSD

    Regards,

  • Verified answer
    Aijaz Profile Picture
    on at

    Hi all,

    I have done it just replace my  top XML line with following one

    <?xml version="1.0"?>

    <Envelope xmlns="http://schemas.microsoft.com/dynamics/2011/01/documents/Message">
    <Header>

    Regards,

  • abhishek1611 Profile Picture
    2,110 on at

    what e Default encoding format into AOT  you have used ?

    I am also facing the same issue

    see screen shot

  • Aijaz Profile Picture
    on at

    Hi Abhishek,

    we are using UTF-8.

    Regards,

  • abhishek1611 Profile Picture
    2,110 on at

    hi Muhammad 

    I tried doing that

    but getting following error 

    Can you pl take a look into this.

    Following is my XML code :

    <?xml version="1.0"?>
    <Envelope xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Message">
    http://schemas.microsoft.com/dynamics/2008/01/documents/Message">
    <Header>
    <MessageId>{A40E1282-E4D9-40F0-A768-94AEE7D0E556}</MessageId>
    <Action>http://schemas.microsoft.com/dynamics/2008/01/services/CustomerService/create</Action>
    </Header>
    <Body>
    <MessageParts>
    <Customer xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Customer">
    http://schemas.microsoft.com/dynamics/2008/01/documents/Customer">
    <CustTable>
    <AccountNum>M9888</AccountNum>
    <CustGroup>20</CustGroup>
    <DefaultDimension>1</DefaultDimension>
    <DirParty xsi:type="AxdEntity_DirParty_DirOrganization" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    http://www.w3.org/2001/XMLSchema-instance">
    <Name>Test customer 888</Name>
    </DirParty>
    </CustTable>
    </Customer>
    </MessageParts>
    </Body>
    </Envelope>

  • Aijaz Profile Picture
    on at

    Hi Abhishek,

    For this create new question with requirment on comminuity.

    Regards,

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans