Hi, I have the following schema.
Code:
HTML Code:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://BioArchR2_Email_Notifications_Pipeline.CustomerAck" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://BioArchR2_Email_Notifications_Pipeline.CustomerAck" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="esbEvent">
<xs:annotation>
<xs:appinfo>
<b:properties>
<b:property distinguished="true" xpath="/*[local-name()='esbEvent' and namespace-uri()='http://BioArchR2_Email_Notifications_Pipeline.CustomerAck']/*[local-name()='header' and namespace-uri()='']/*[local-name()='errorNumber' and namespace-uri()='']" />
</b:properties>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="header">
<xs:complexType>
<xs:sequence>
<xs:element name="eventDateTime" type="xs:string" />
<xs:element name="interfaceName" type="xs:string" />
<xs:element name="transID" type="xs:string" />
<xs:element name="resultCode" type="xs:string" />
<xs:element name="errorNumber" type="xs:string" />
<xs:element name="contentCount" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="resultDescription">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="error" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="unbounded" name="warning" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
-----------------------------
When I validate the sample given below against the schema, I get an error. The sample and error are given below.
HTML Code:
<esbEvent xmlns="http://BioArchR2_Email_Notifications_Pipeline.CustomerAck">
<header>
<eventDateTime>01/12/2012 10:25:29 AM</eventDateTime>
<interfaceName>CFS.Customer</interfaceName>
<transID>PhoneTest20120106sg.xml01-12-2012 10:16:26.0</transID>
<resultCode>-1</resultCode>
<errorNumber>3</errorNumber>
<contentCount>0</contentCount>
</header>
<resultDescription>
<error>Error</error>
<error>INTERNAL_ERROR Error</error>
<error>Error</error>
</resultDescription>
/esbEvent>
-----------------------------
Error:
The element 'esbEvent' in namespace 'http://BioArchR2_Email_Notifications_Pipeline.CustomerAck ' has invalid child element 'header' in namespace 'http://BioArchR2_Email_Notifications_Pipeline.CustomerAck '. List of possible elements expected: 'header'.
-----------------------------
Can anyone please help me with getting over this issue. I spent a day to see what is wrong and can't still figure out.
thanks in advance.