Supply Chain Management in Dynamics AX

This blog contains information and feedback on the Supply Chain Management area in Microsoft Dynamics AX

Import Vendor Catalogs – Part 3 (Troubleshooting)

Import Vendor Catalogs – Part 3 (Troubleshooting)

  • Comments 6

It’s seems like it’s time for a new post in the series about importing vendor catalogs in Dynamics AX 2012. The previous couple of blog posts covered setup and importing a sample catalog. It’s all well and nice but what if something went wrong somewhere along the way of setting up the feature. Below you will find a list of problems that can arise during vendor catalog import setup. And of course the solutions to the problems will be described in detail.

Questions and Answers

I try to import a Vendor catalog with Dynamics AX. I generate the XSD File but it is really not clear how to populate it.

The XSD file that you can generate from the vendor catalog form provides you with the schema of the CMR file that can be imported. XSD (XML Schema Definition) is one of several XML schema languages. The blog post about importing a sample catalog contains a detailed list of steps that you need to take to generated a sample CMR file.

I’d like to see an example of a CMR file with data to import?

It is important to note that the XSD schema for CMR files depends on the procurement hierarchy that you set up in Dynamics AX so the chances of successfully importing sample CMR files are really-really low because the XSD schema produced from your system will most probably differ from the one that was used to generate the sample file. However it’s always nice to see a sample file just to have an idea of what kind of beast the CMR file is. Below is the XML that a sample file might contain:

<?xml version="1.0" encoding="utf-8"?>
<VendorCatalog VendorName="CatImpVend" LoadDate="1900-01-01T01:01:01+01:00" ProductClassification="Procurement Category" xmlns="http://dax.com/vendorcatalog">
  <Product xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="root" Delete="No" ProductCode="ProductCode1" ProductSearchName="ProductSearchName1">
    <PriceInformation>
      <Price Currency="USD" UnitOfMeasure="%" Value="100">
      </Price>
    </PriceInformation>
    <ProductNameAndDescription>
      <NameAndDescription>
        <Description>Description1</Description>
        <Name>Name1</Name>
        <Language>af</Language>
      </NameAndDescription>
    </ProductNameAndDescription>
    <ProductAttributes>
      <Color Language="af">Blue</Color>
    </ProductAttributes>
  </Product>
</VendorCatalog>

I’m getting the error “Imported schema for namespace ‘http://www.w3.org/XML/1998/namespace’ was not resolved” when trying to generate in Visual Studio a sample CMR file based on the XSD schema.

This is a known issue. The workaround is to remove the line below from the XSD file:

<xs:import schemaLocation="http://www.w3.org/2001/xml.xsd" namespace="http://www.w3.org/XML/1998/namespace" />

 

When I run the AIF job for processing no error is given but the status of the import in the Catalog file history does not change

The error was most probably logged in the AIF exception log: System administration\Periodic\Application integrationServices and Application Integration Framework\Exceptions.

In the AIF exception log there is an error: Could not find schema information for the element 'http://dax.com/vendorcatalog:VendorCatalog'.

Make sure that you set up the inbound port in AIF as in Walkthrough: Configuring an inbound integration port for catalog import [AX 2012]. Pay special attention to the paragraph about setting up the pipeline component:

The catalog import service requires a special component that processes CMR documents. To enable this component, follow these steps.

  1. In the Inbound ports form, on the Processing options tab, select the Preprocess service operation requests check box, and then click Inbound pipelines.

  2. In the Inbound pipelines form, click Add. Then, in the Class name list, select CatVendorXmlTransform.

  3. In the Purpose field, enter an optional description, such as “Transform vendor XML files,” and then close the Inbound pipelines form.

  4. Click Activate to deploy the integration port.

When I'm trying to set the Root folder path in the Vendor catalog import parameters nothing happens when I click the OK button.

The reason is most probably because the user account that is used to run AOS does not have permissions to the folder you chose.

I uploaded the CMR file but after running the AIF import jobs the status in the event log is still "Catalog upload complete ".

Verify the AIF exception log.

Verify that you set up the inbound port for vendor catalog import correctly

Verify that you used correct URI in the inbound port. It should be set up with CatalogImportPickup subfolder rather than with the root folder.

Conclusion

I hope this information was useful. I would like to make this article into a live blog post. So if you have any problems with setting up vendor catalog import please write to me or post a comment and I will do my best to resolve your problem and post the resolution in this article.

  • we have a problem with the vendor catalog. We get to the point that the catalog is imported, but according to the event log it is not validated against the xsd schema.

    What could case failing this validation? is the validation controlled by the workflow?

    Thanks a lot for your answer

  • Hi Bastiaan,

    Have you tried looking in the AIF exception log (System administration\Periodic\Application integrationServices and Application Integration Framework\Exceptions)? There might be some context there about which tag/attribute is incorrect.

    Essentially the validation of the CMR file is performed against the XSD schema that you generated from the Vendor Catalog form so you should be able to use any standard xsd validation tool to get more info.

    Best regards,

    Vanya

    P.S. I think there is an error in the second blog post in the series that I forgot to correct (now it's fixed). When generating the sample CMR file from visual studio you should right click the VendorCatalog (instead of Product) node in the XML schema explorer and then click Generate Sample XML. Could you also try that?

  • Hi Vanya,

    Thanks for you quick response!

    I checked the expections log, but there is no message on the vendor catalog import and i've created the XML sample by right click on the VendorCatalog.

    According to the event log on the catalog file history the catalog upload was completed, however the next step 'validating with schema' is not performed. See status descriptions in step 9 of technet description technet.microsoft.com/.../hh242762

    could this be a problem with a workflow or with the inbound port.

    Best regards,

    Bastiaan

  • Did you run the AIF processing jobs (see the first blog post in the series: blogs.msdn.com/.../import-vendor-catalogs-from-setup-to-importing-a-sample-catalog-part-1-setup.aspx)?

    1: static void runAIFReceive(Args _args)

     2: {

     3:     new AifGatewayReceiveService().run();

     4:     new AifInboundProcessingService().run();

     5:  

     6:     info('AIF processing done');

     7: }

  • Thanks for your help!

    we found the problem, we used an incorrect URI in the inbound port, it was setup with the root folder, instead of the catalogimportpickup subfolder.

    Regards Bastiaan

  • Hi Vanya,

    I have used you guides regarding Import Vendor Catalog (all 3 parts) and found them very usefull.

    We succeded in setting up the entire Vendor Catalog import and it works like a charm on the basis of a simplified xml test file (as illustrated in your blog above).

    I have run into some problems with the XSD file generated from the vendor catalog. We have resolved the issue with the 'Imported schema for namespace ‘www.w3.org/.../namespace’ by deleting it as described, but when we try to map the XSD file in Excel (Developer - Source - XML Maps), we get a error:

    "The following Scema elements and structures cannot be mapped to a worksheet. They will not be visible in the XML Source task pane.

    - any

    - anyAttribute

    - Substitution groups

    - Abstract elements

    - Recursive  structures

    - Mixed content

    Will you continue ..... and so on.

    When we continue, then the only available VendorCatalog_Map in the Source is:

    VendorName

    LoadDate

    ProductClassification

    Could you point me in the right direction of a solution to the matter, I would me most pleased.

    Kindest regards

    Michael Munck

Page 1 of 1 (6 items)
Leave a Comment
  • Please add 1 and 6 and type the answer here:
  • Post