Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Biztalk
|
Biztalk General discussion about Biztalk server.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Biztalk section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 20th, 2005, 10:10 AM
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ComplexType Import Flat File Problem

I have a problem. I create a file XSD that contains simpletypes and complextypes, generate the dll, register it in the GAC, modify the BTSNTSvc.exe.config, import the dll in a different XSD (of an other project) having extention flatfile. But the Validate Instance of a input file output following error:

Type 'Prova.Attribute.att:complexType1eretrte' is not declared. An error occurred at file:///C:/Documents and Settings/pietro/My Documents/Visual Studio Projects/prova/prova/Schema1.xsd, (69, 16).


Validate Instance failed for schema Schema1.xsd, file: <file:///C:\Documents and Settings\pietro\My Documents\Visual Studio Projects\prova\prova\prova.txt>.



Prova.Attribute.att:

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="Prova.Attribute.att" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="Prova.Attribute.att" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Root">
    <xs:complexType />
  </xs:element>
  <xs:simpleType name="simpleType1qw">
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:simpleType name="simpleType2qw">
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:complexType name="complexType1qw">
    <xs:sequence />
    <xs:attribute name="attribute1" type="simpleType1qw" />
    <xs:attribute name="attribute2" type="simpleType1qwqw" />
    <xs:attribute name="attribute3" type="simpleType2qw" />
  </xs:complexType>
  <xs:simpleType name="simpleType1qwqw">
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:simpleType name="simpleType1qwqwqw">
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:complexType name="complexType1eretrte">
    <xs:sequence />
    <xs:attribute name="attribute1" type="simpleType1qw" />
    <xs:attribute name="attribute2" type="simpleType1qwqwqw" />
    <xs:attribute name="attribute3" type="simpleType2qw" />
    <xs:attribute name="attribute4" type="simpleType1qwqw" />
    <xs:attribute name="attribute5" type="simpleType1qwqw" />
  </xs:complexType>
</xs:schema>


prova.txt:

ROOT,PO|asdwwwwwwwwwwwwwwrrrrrr|sdwwwfffffggggg,RO §TO;24234;213123;1231231;31212;yytuy



Schema1.xsd:

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:ns0="Prova.Attribute.att" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" xmlns="Prova.Format.Schema1" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="Prova.Format.Schema1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import schemaLocation="Prova.Attribute.att" namespace="Prova.Attribute.att" />
  <xs:annotation>
    <xs:appinfo>
      <b:schemaInfo count_positions_by_byte="false" standard="Flat File" root_reference="Root" />
      <schemaEditorExtension:schemaInfo namespaceAlias="b" extensionClass="Microsoft.BizTalk.FlatFileExtensio n.FlatFileExtension" standardName="Flat File" xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
      <b:references>
        <b:reference targetNamespace="Prova.Attribute.att" />
      </b:references>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="Root">
    <xs:annotation>
      <xs:appinfo>
        <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" child_delimiter_type="char" child_delimiter="," tag_name="ROOT" />
      </xs:appinfo>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:annotation>
          <xs:appinfo>
            <b:groupInfo sequence_number="0" />
          </xs:appinfo>
        </xs:annotation>
        <xs:element name="Record">
          <xs:annotation>
            <xs:appinfo>
              <b:recordInfo structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" tag_name="PO" child_delimiter_type="char" child_delimiter="|" />
            </xs:appinfo>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:annotation>
                <xs:appinfo>
                  <b:groupInfo sequence_number="0" />
                </xs:appinfo>
              </xs:annotation>
              <xs:element name="Record" type="complexType1">
                <xs:annotation>
                  <xs:appinfo>
                    <b:recordInfo structure="positional" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="1" />
                  </xs:appinfo>
                </xs:annotation>
              </xs:element>
              <xs:element name="Record1" type="complexType2">
                <xs:annotation>
                  <xs:appinfo>
                    <b:recordInfo structure="positional" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" sequence_number="2" />
                  </xs:appinfo>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Record2">
          <xs:annotation>
            <xs:appinfo>
              <b:recordInfo sequence_number="2" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" tag_name="RO" child_delimiter_type="char" child_delimiter="§" />
            </xs:appinfo>
          </xs:annotation>
          <xs:complexType>
            <xs:sequence>
              <xs:annotation>
                <xs:appinfo>
                  <b:groupInfo sequence_number="0" />
                </xs:appinfo>
              </xs:annotation>
              <xs:element name="Record" type="ns0:complexType1eretrte">
                <xs:annotation>
                  <xs:appinfo>
                    <b:recordInfo sequence_number="1" structure="delimited" preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false" child_delimiter_type="char" child_delimiter=";" tag_name="TO" />
                  </xs:appinfo>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="complexType1">
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <b:groupInfo sequence_number="0" />
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="Field" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <b:fieldInfo sequence_number="3" justification="left" pos_length="6" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="attribute1" type="simpleType1">
      <xs:annotation>
        <xs:appinfo>
          <b:fieldInfo justification="left" sequence_number="1" pos_length="3" />
        </xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="attribute2" type="simpleType3">
      <xs:annotation>
        <xs:appinfo>
          <b:fieldInfo justification="left" sequence_number="2" pos_length="14" />
        </xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:simpleType name="simpleType1">
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:simpleType name="simpleType2">
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:simpleType name="simpleType3">
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:simpleType name="simpleType4">
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:simpleType name="simpleType5">
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:complexType name="complexType2">
    <xs:sequence>
      <xs:annotation>
        <xs:appinfo>
          <b:groupInfo sequence_number="0" />
        </xs:appinfo>
      </xs:annotation>
    </xs:sequence>
    <xs:attribute name="attribute1" type="simpleType1">
      <xs:annotation>
        <xs:appinfo>
          <b:fieldInfo justification="left" sequence_number="1" pos_length="2" />
        </xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="attribute2" type="simpleType2">
      <xs:annotation>
        <xs:appinfo>
          <b:fieldInfo justification="left" sequence_number="2" pos_length="3" />
        </xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="attribute3" type="simpleType3">
      <xs:annotation>
        <xs:appinfo>
          <b:fieldInfo justification="left" sequence_number="3" pos_length="5" />
        </xs:appinfo>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="attribute4" type="simpleType5">
      <xs:annotation>
        <xs:appinfo>
          <b:fieldInfo justification="left" sequence_number="4" pos_length="5" />
        </xs:appinfo>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
</xs:schema>



instead if I declare locally simpletype and complextype than it don't output error.

(this error is genereted whether in delimited mode or in positional mode)


I am in despair!!!!

Help me!!
:(






Similar Threads
Thread Thread Starter Forum Replies Last Post
a problem in use vc++.net to import WAB file! madaodao Visual C++ 2005 0 March 23rd, 2006 10:13 PM
Global Variable to Flat File import ao7711 SQL Server DTS 2 November 10th, 2005 06:01 PM
Import delimited flat file into SQL Server 2000 DevCsharp C# 1 April 27th, 2005 11:52 PM
Problem using positional flat file Sameer_Borikar Biztalk 0 March 3rd, 2005 08:11 AM
importing from flat file PK problem olambe Classic ASP Databases 3 October 18th, 2004 04:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.