Reputation: 2167
I am using BizTalk for the first time. I created a simple schema and simple XML document and trying to Validate the Instance. I am getting BEC2004 Error.
The Schema has The Employee Record with Name and ID attributes.
<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns="http://myabc.xyz.Schema1" xmlns:b="http://schemas.microsoft.com /BizTalk/2003" targetNamespace="http://myabc.xyz.Schema1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Employee">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element name="ID" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
And I created a XML file with these fields alone
<?xml version="1.0" encoding="utf-8"?>
<Employee xmlns ="http://myabc.xyz.Schema1">
<Name>Dhana</Name>
<ID>001</ID>
</Employee >
The XML itself shows a error as The "http://myabc.xyz.Schema1" has not been declared.
If I validate the Instance I get error like
BEC2004 The element 'Employee' in namespace has invalid child element 'Name' in namespace 'http://myabc.xyz.Schema1'. List of possible elements expected: 'Name'.
Can anybody help me.
Upvotes: 0
Views: 1855
Reputation: 11040
Set the Form property of Name to Unqualified. You will find that property on the Name element in the xsd file.
Upvotes: 1