Reputation: 2167
I created a send and receive schema and generated a XML Instance for the Receive Schema.I created Map between send and receive schema. When I tried to Test the Map I used the Instance created with the Receive Schema as Input Instance. It throws an Error like
TestMap used the following file: as input to the map.error btm1044: Input validation error: The element is not declared.
Receive Schema
<?xml version="1.0" encoding="utf-16" ?>
- <xs:schema xmlns="http://www.myabc.org/biztalk/sample1/" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://www.myabc.org/biztalk/sample1/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="Employee">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="EmpDetails">
- <xs:complexType>
- <xs:sequence>
<xs:element name="Name" type="xs:string" />
<xs:element name="Age" type="xs:string" />
<xs:element name="Email" type="xs:string" />
<xs:element name="Phone" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="Address">
- <xs:complexType>
- <xs:sequence>
<xs:element name="Street" type="xs:string" />
<xs:element name="City" type="xs:string" />
<xs:element name="PinCode" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
The Input XML Instance used is
ns0:Employee xmlns:ns0="http://www.myabc.org/biztalk/sample1/">
- <EmpDetails>
<Name>Name_0</Name>
<Age>Age_0</Age>
<Email>Email_0</Email>
<Phone>Phone_0</Phone>
</EmpDetails>
- <Address>
<Street>Street_0</Street>
<City>City_0</City>
<PinCode>PinCode_0</PinCode>
</Address>
</ns0:Employee>
Can anyone help me out.
Thanks
Upvotes: 0
Views: 1321
Reputation: 3266
When I copy/paste your XSD and XML files into Visual Studio and remove all of the "-" characters before the nodes, I get this:
Invoking component...
Validate Instance succeeded for schema test.xsd, file: <file:///C:\Temp\test.xml>.
Component invocation succeeded.
It seems to me the instance is valid. The remark from Vikas Bhardway is a very good starting point here: try generating an instance and compare the two on nodes, namespaces, etc...
Upvotes: 1
Reputation: 1510
Validate yr XML against the schema if it's not valid then generate a new instance and try with that again
Upvotes: 1