|
Home > Archive > BizTalk Server General > October 2004 > The data at the root level is invalid
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
The data at the root level is invalid
|
|
| RichTheHSTGuy 2004-10-26, 5:48 pm |
| I've opened up the SDK and went to the AssemblerDisassembler and opened up
the file recieve project and set it up. I've tried to run it but when ever I
validate the instance it gives me the "The data at the root level is invalid.
I can't figure out what is going on, this is right out of the package and
doesn't work
<?xml version="1.0" encoding="utf-16" ?>
- <xsd:schema xmlns="http://FlatFileRecieve.PO"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
attributeFormDefault="unqualified" elementFormDefault="unqualified"
targetNamespace="http://FlatFileRecieve.PO"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:annotation>
<xsd:documentation xml:lang="en">Purchase order schema for Example.com.
Copyright 2000 Example.com. All rights reserved.</xsd:documentation>
- <xsd:appinfo>
<b:schemaInfo standard="Flat File" root_reference="purchaseOrder"
count_positions_by_byte="false" />
<schemaEditorExtension:schemaInfo namespaceAlias="b"
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
standardName="Flat File"
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
</xsd:appinfo>
</xsd:annotation>
- <xsd:element name="purchaseOrder" type="PurchaseOrderType">
- <xsd:annotation>
- <xsd:appinfo>
<b:recordInfo child_order="postfix" child_delimiter_type="hex"
child_delimiter="0x0D 0x0A" suppress_trailing_delimiters="false"
sequence_number="1" max_seq_number="5" structure="delimited"
preserve_delimiter_for_empty_data="true" tag_name="PO" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element name="comment" type="xsd:string">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="2" justification="left" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:complexType name="PurchaseOrderType">
- <xsd:sequence>
- <xsd:annotation>
- <xsd:appinfo>
<groupInfo xmlns="http://schemas.microsoft.com/BizTalk/2003"
sequence_number="0" />
</xsd:appinfo>
</xsd:annotation>
- <xsd:element name="shipTo" type="USAddress">
- <xsd:annotation>
- <xsd:appinfo>
<b:recordInfo child_order="infix" child_delimiter_type="char"
child_delimiter="," suppress_trailing_delimiters="false" sequence_number="2"
max_seq_number="6" structure="positional"
preserve_delimiter_for_empty_data="true" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element name="billTo" type="USAddress">
- <xsd:annotation>
- <xsd:appinfo>
<b:recordInfo child_delimiter_type="char" child_order="infix"
child_delimiter="," suppress_trailing_delimiters="false" sequence_number="3"
max_seq_number="6" structure="positional"
preserve_delimiter_for_empty_data="true" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element minOccurs="0" ref="comment">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="4" justification="left" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element name="items" type="Items">
- <xsd:annotation>
- <xsd:appinfo>
<b:recordInfo tag_name="ITEMS" child_order="prefix"
child_delimiter_type="char" child_delimiter=","
suppress_trailing_delimiters="false" sequence_number="5" max_seq_number="1"
structure="delimited" preserve_delimiter_for_empty_data="true" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="orderDate" type="xsd:date">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
- <xsd:complexType name="USAddress">
- <xsd:sequence>
- <xsd:annotation>
- <xsd:appinfo>
<groupInfo xmlns="http://schemas.microsoft.com/BizTalk/2003"
sequence_number="0" />
</xsd:appinfo>
</xsd:annotation>
- <xsd:element name="name" type="xsd:string">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="2" justification="left" pos_length="20" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element name="street" type="xsd:string">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="3" justification="left" pos_length="20" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element name="city" type="xsd:string">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="4" justification="left" pos_length="15" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element name="state" type="xsd:string">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="5" justification="left" pos_length="2" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element name="zip" type="xsd:decimal">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="6" justification="left" pos_length="5"
pos_offset="1" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
- <xsd:attribute fixed="US" name="country" type="xsd:NMTOKEN">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="1" justification="left" pos_length="10" />
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
- <xsd:complexType name="Items">
- <xsd:sequence>
- <xsd:annotation>
- <xsd:appinfo>
<groupInfo xmlns="http://schemas.microsoft.com/BizTalk/2003"
sequence_number="0" />
</xsd:appinfo>
</xsd:annotation>
- <xsd:element minOccurs="0" maxOccurs="unbounded" name="item">
- <xsd:annotation>
- <xsd:appinfo>
<b:recordInfo child_order="infix" child_delimiter_type="char"
child_delimiter="|" tag_name="ITEM" suppress_trailing_delimiters="false"
sequence_number="1" max_seq_number="6" structure="delimited"
preserve_delimiter_for_empty_data="true" />
</xsd:appinfo>
</xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:annotation>
- <xsd:appinfo>
<groupInfo xmlns="http://schemas.microsoft.com/BizTalk/2003"
sequence_number="0" />
</xsd:appinfo>
</xsd:annotation>
- <xsd:element name="productName" type="xsd:string">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="2" justification="left" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element name="quantity">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="3" justification="left" />
</xsd:appinfo>
</xsd:annotation>
- <xsd:simpleType>
- <xsd:restriction base="xsd:positiveInteger">
<xsd:maxExclusive value="100" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
- <xsd:element name="USPrice" type="xsd:decimal">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="4" justification="left" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element ref="comment">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="5" justification="left" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
- <xsd:element minOccurs="0" name="shipDate" type="xsd:date">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="6" justification="left" />
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="partNum" type="SKU" use="required">
- <xsd:annotation>
- <xsd:appinfo>
<b:fieldInfo sequence_number="1" justification="left" />
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
- <xsd:simpleType name="SKU">
- <xsd:restriction base="xsd:string">
<xsd:pattern value="\d{3}-[A-Z]{2}" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
| |
| RichTheHSTGuy 2004-10-26, 5:48 pm |
| The data:
PO1999-10-20
US Alice Smith 123 Maple Street Mill Valley CA 90952
US Robert Smith 8 Oak Avenue Old Town PA 95819
Hurry, my lawn is going wild!
ITEMS,ITEM872-AA|Lawnmower|1|148.95|Confirm this is electric,ITEM926-AA|Baby
Monitor|1|39.98|Confirm this is electric|1999-05-21
"RichTheHSTGuy" wrote:
> I've opened up the SDK and went to the AssemblerDisassembler and opened up
> the file recieve project and set it up. I've tried to run it but when ever I
> validate the instance it gives me the "The data at the root level is invalid.
> I can't figure out what is going on, this is right out of the package and
> doesn't work
>
> <?xml version="1.0" encoding="utf-16" ?>
> - <xsd:schema xmlns="http://FlatFileRecieve.PO"
> xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
> attributeFormDefault="unqualified" elementFormDefault="unqualified"
> targetNamespace="http://FlatFileRecieve.PO"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> - <xsd:annotation>
> <xsd:documentation xml:lang="en">Purchase order schema for Example.com.
> Copyright 2000 Example.com. All rights reserved.</xsd:documentation>
> - <xsd:appinfo>
> <b:schemaInfo standard="Flat File" root_reference="purchaseOrder"
> count_positions_by_byte="false" />
> <schemaEditorExtension:schemaInfo namespaceAlias="b"
> extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
> standardName="Flat File"
> xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
> </xsd:appinfo>
> </xsd:annotation>
> - <xsd:element name="purchaseOrder" type="PurchaseOrderType">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:recordInfo child_order="postfix" child_delimiter_type="hex"
> child_delimiter="0x0D 0x0A" suppress_trailing_delimiters="false"
> sequence_number="1" max_seq_number="5" structure="delimited"
> preserve_delimiter_for_empty_data="true" tag_name="PO" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element name="comment" type="xsd:string">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="2" justification="left" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:complexType name="PurchaseOrderType">
> - <xsd:sequence>
> - <xsd:annotation>
> - <xsd:appinfo>
> <groupInfo xmlns="http://schemas.microsoft.com/BizTalk/2003"
> sequence_number="0" />
> </xsd:appinfo>
> </xsd:annotation>
> - <xsd:element name="shipTo" type="USAddress">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:recordInfo child_order="infix" child_delimiter_type="char"
> child_delimiter="," suppress_trailing_delimiters="false" sequence_number="2"
> max_seq_number="6" structure="positional"
> preserve_delimiter_for_empty_data="true" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element name="billTo" type="USAddress">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:recordInfo child_delimiter_type="char" child_order="infix"
> child_delimiter="," suppress_trailing_delimiters="false" sequence_number="3"
> max_seq_number="6" structure="positional"
> preserve_delimiter_for_empty_data="true" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element minOccurs="0" ref="comment">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="4" justification="left" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element name="items" type="Items">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:recordInfo tag_name="ITEMS" child_order="prefix"
> child_delimiter_type="char" child_delimiter=","
> suppress_trailing_delimiters="false" sequence_number="5" max_seq_number="1"
> structure="delimited" preserve_delimiter_for_empty_data="true" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> </xsd:sequence>
> - <xsd:attribute name="orderDate" type="xsd:date">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="1" justification="left" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:attribute>
> </xsd:complexType>
> - <xsd:complexType name="USAddress">
> - <xsd:sequence>
> - <xsd:annotation>
> - <xsd:appinfo>
> <groupInfo xmlns="http://schemas.microsoft.com/BizTalk/2003"
> sequence_number="0" />
> </xsd:appinfo>
> </xsd:annotation>
> - <xsd:element name="name" type="xsd:string">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="2" justification="left" pos_length="20" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element name="street" type="xsd:string">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="3" justification="left" pos_length="20" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element name="city" type="xsd:string">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="4" justification="left" pos_length="15" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element name="state" type="xsd:string">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="5" justification="left" pos_length="2" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element name="zip" type="xsd:decimal">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="6" justification="left" pos_length="5"
> pos_offset="1" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> </xsd:sequence>
> - <xsd:attribute fixed="US" name="country" type="xsd:NMTOKEN">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="1" justification="left" pos_length="10" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:attribute>
> </xsd:complexType>
> - <xsd:complexType name="Items">
> - <xsd:sequence>
> - <xsd:annotation>
> - <xsd:appinfo>
> <groupInfo xmlns="http://schemas.microsoft.com/BizTalk/2003"
> sequence_number="0" />
> </xsd:appinfo>
> </xsd:annotation>
> - <xsd:element minOccurs="0" maxOccurs="unbounded" name="item">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:recordInfo child_order="infix" child_delimiter_type="char"
> child_delimiter="|" tag_name="ITEM" suppress_trailing_delimiters="false"
> sequence_number="1" max_seq_number="6" structure="delimited"
> preserve_delimiter_for_empty_data="true" />
> </xsd:appinfo>
> </xsd:annotation>
> - <xsd:complexType>
> - <xsd:sequence>
> - <xsd:annotation>
> - <xsd:appinfo>
> <groupInfo xmlns="http://schemas.microsoft.com/BizTalk/2003"
> sequence_number="0" />
> </xsd:appinfo>
> </xsd:annotation>
> - <xsd:element name="productName" type="xsd:string">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="2" justification="left" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element name="quantity">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="3" justification="left" />
> </xsd:appinfo>
> </xsd:annotation>
> - <xsd:simpleType>
> - <xsd:restriction base="xsd:positiveInteger">
> <xsd:maxExclusive value="100" />
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
> - <xsd:element name="USPrice" type="xsd:decimal">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="4" justification="left" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element ref="comment">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="5" justification="left" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> - <xsd:element minOccurs="0" name="shipDate" type="xsd:date">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="6" justification="left" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
> </xsd:sequence>
> - <xsd:attribute name="partNum" type="SKU" use="required">
> - <xsd:annotation>
> - <xsd:appinfo>
> <b:fieldInfo sequence_number="1" justification="left" />
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:attribute>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> - <xsd:simpleType name="SKU">
> - <xsd:restriction base="xsd:string">
> <xsd:pattern value="\d{3}-[A-Z]{2}" />
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:schema>
| |
| Stephen W. Thomas 2004-10-26, 5:48 pm |
| Hello.
You might have the Input type for the file you are validating set to XML
when it should be Native since it is a flat file.
To change this, go to the Schema. Right click, go to Properties. Change
the Validate Instance Input Type to native.
Stephen W. Thomas
http://www.geekswithblogs.net/sthomas
"RichTheHSTGuy" wrote:
[vbcol=seagreen]
> The data:
>
> PO1999-10-20
> US Alice Smith 123 Maple Street Mill Valley CA 90952
> US Robert Smith 8 Oak Avenue Old Town PA 95819
> Hurry, my lawn is going wild!
> ITEMS,ITEM872-AA|Lawnmower|1|148.95|Confirm this is electric,ITEM926-AA|Baby
> Monitor|1|39.98|Confirm this is electric|1999-05-21
>
>
> "RichTheHSTGuy" wrote:
>
| |
| RichTheHSTGuy 2004-10-27, 5:49 pm |
| Steve,
That was the tickey, kind of new at this. Appreciate the help.
"Stephen W. Thomas" wrote:
[vbcol=seagreen]
> Hello.
>
> You might have the Input type for the file you are validating set to XML
> when it should be Native since it is a flat file.
>
> To change this, go to the Schema. Right click, go to Properties. Change
> the Validate Instance Input Type to native.
>
> Stephen W. Thomas
> http://www.geekswithblogs.net/sthomas
>
>
> "RichTheHSTGuy" wrote:
>
|
|
|
|
|