Error XML Import NAV2009

polmann
Member Posts: 18
Hi i’m trying to create an XMLPort to import an XML file. The format looks something like the code below. If i remove the xmlns tags and the com: in front of the ID, the import works fine. Is there a way to make the import work without removing these tags/prefix? I get the following error message when i try to import the file.
Microsoft Dynamics NAV Classic
The XML Parser setup fails.
Error = c00cee65 Code meaning = Unknown error 0xC00CEE65
OK
<?xml version="1.0" encoding="UTF-8" ?>
- <Invoice xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/" xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/" xmlns:xsi="http://rep.oio.dk/ubl/xml/schemas/0p71/XMLSchema-instance">
<com:ID>123456789</com:ID>
</Invoice>
/Polmann
Microsoft Dynamics NAV Classic
The XML Parser setup fails.
Error = c00cee65 Code meaning = Unknown error 0xC00CEE65
OK
<?xml version="1.0" encoding="UTF-8" ?>
- <Invoice xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/" xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/" xmlns:xsi="http://rep.oio.dk/ubl/xml/schemas/0p71/XMLSchema-instance">
<com:ID>123456789</com:ID>
</Invoice>
/Polmann
0
Answers
-
You can try to play with UseDefaultNamespace and DefaultNamespace properties of the XMLPort,may be it will somehow help...0
-
I've seen this problem with XML data being sent to NAV and it doesn't handle/work with namespaces very well or easily.
The simplest approach that I've found works well with NAV is to remove the namespace from an incomming XML document before sending the stream to the XML Port. You can find an example here http://www.mibuso.com/forum/viewtopic.php?f=23&t=14637&hilit=xml+namespace where there is a function that removes the namespace.
I haven't played with the DefaultNamespace properties and I'm not sure if they work on Input or Export XML ports - but removing the namespace should definately help.0 -
The issue with defaultNamespace is that it can handle only one. XMLPort assign the tag to each tag element.
It cannnot handle mulitple namespaces.
Follow jlandeen advise and use the function to remove all namespaces before loading the xml file.0 -
Thanks for the answers. I think that i will use the function to remove all namespaces, and then do the import.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions