XML Port error in R2

pranav-joshipranav-joshi Member Posts: 46
edited 2012-06-14 in NAV Three Tier
Hi guys,

I am importing following XML file, using XML port and I am having error that "Attribute <invoice> is unexpected.

<?xml version="1.0"?>
<invoice imosmsg:action="update" xmlns:imosmsg="http://schemas.veson.com/2005/ImosMsg&quot; xmlns="http://schemas.veson.com/2005/ImosAct&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
<status>1</status>
<transNo>12AQUI0000002N</transNo>
<transType>1</transType>
</invoice>

Here is my XML Port:


OBJECT XMLport 50004 Test IMPORT
{
OBJECT-PROPERTIES
{
Date=06/11/12;
Time=11:00:49 PM;
Modified=Yes;
Version List=Test IMPORT;
}
PROPERTIES
{
DefaultNamespace=http://www.w3.org/2001/XMLSchema-instance;
UseDefaultNamespace=Yes;
}
ELEMENTS
{
{ [{42E6DED6-709B-4EA5-9D2B-ECD94334ADBF}]; ;invoice ;Element ;Table ;
VariableName=<IMOS_TranHeader>;
SourceTable=Table50022 }

{ [{A68D27D3-CDA3-471A-AAF4-4BE9C823D4A8}];1 ;status ;Element ;Field ;
DataType=Code;
SourceField=<IMOS_TranHeader>::status }

{ [{AD0729A7-9B68-4D13-87D0-5B2322E13A97}];1 ;transNo ;Element ;Field ;
DataType=Code;
SourceField=<IMOS_TranHeader>::transNo }



It looks like I am having error because file is containing Namespace.
I deleted namespace from file and just kept <invoice> tag and it worked.
Anyone know solution?

Pranav Joshi
MS Dynamics NAV Consultant
SBS Group Desert Mountain (Formerly Silverware Inc.)

Comments

Sign In or Register to comment.