The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<?xml version="1.0"?>
<wsdl:definitions 
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    xmlns:s0="http://www.ncbi.nlm.nih.gov/soap/eutils/" 
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns="http://schemas.xmlsoap.org/wsdl/" 
    targetNamespace="http://www.ncbi.nlm.nih.gov/soap/eutils/"
    xmlns:nsef="http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq" 
>
<!--    version="2.0" -->

    <types>
<xs:schema 
    xmlns:tns="http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq"
    xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:ncbi="http://www.ncbi.nlm.nih.gov"
    targetNamespace="http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_seq"
    elementFormDefault="qualified"
    >
<!--    version="2.0" -->
<xs:element name="TSeq">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="TSeq_seqtype">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="nucleotide"/>
                <xs:enumeration value="protein"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="TSeq_gi" type="xs:integer" minOccurs="0"/>
      <xs:element name="TSeq_accver" type="xs:string" minOccurs="0"/>
      <xs:element name="TSeq_sid" type="xs:string" minOccurs="0"/>
      <xs:element name="TSeq_local" type="xs:string" minOccurs="0"/>
      <xs:element name="TSeq_taxid" type="xs:integer" minOccurs="0"/>
      <xs:element name="TSeq_orgname" type="xs:string" minOccurs="0"/>
      <xs:element name="TSeq_defline" type="xs:string"/>
      <xs:element name="TSeq_length" type="xs:integer"/>
      <xs:element name="TSeq_sequence" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<!-- a bunch of them -->
<xs:element name="TSeqSet">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="tns:TSeq"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>


<!--
********
  GBSeq represents the elements in a GenBank style report
    of a sequence with some small additions to structure and support
    for protein (GenPept) versions of GenBank format as seen in
    Entrez. While this represents the simplification, reduction of
    detail, and flattening to a single sequence perspective of GenBank
    format (compared with the full ASN.1 or XML from which GenBank and
    this format is derived at NCBI), it is presented in ASN.1 or XML for
    automated parsing and processing. It is hoped that this compromise
    will be useful for those bulk processing at the GenBank format level
    of detail today. Since it is a compromise, a number of pragmatic
    decisions have been made.

  In pursuit of simplicity and familiarity a number of
    fields do not have full substructure defined here where there is
    already a standard GenBank format string. For example:

    Date  DD-Mon-YYYY
    Authors   LastName, Intials (with periods)
   Journal   JounalName Volume (issue), page-range (year)
   FeatureLocations as per GenBank feature table, but FeatureIntervals
    may also be provided as a convenience
   FeatureQualifiers  as per GenBank feature table
   Primary has a string that represents a table to construct
    a third party (TPA) sequence.
   other-seqids can have strings with the "vertical bar format" sequence
    identifiers used in BLAST for example, when they are non-genbank types.
    Currently in GenBank format you only see GI, but there are others, like
    patents, submitter clone names, etc which will appear here, as they
    always have in the ASN.1 format, and full XML format.
   source-db is a formatted text block for peptides in GenPept format that
    carries information from the source protein database.

  There are also a number of elements that could have been
   more exactly specified, but in the interest of simplicity
   have been simply left as options. For example..

  accession and accession.version will always appear in a GenBank record
   they are optional because this format can also be used for non-GenBank
   sequences, and in that case will have only "other-seqids".

  sequences will normally all have "sequence" filled in. But contig records
    will have a "join" statement in the "contig" slot, and no "sequence".
    We also may consider a retrieval option with no sequence of any kind
     and no feature table to quickly check minimal values.

  a reference may have an author list, or be from a consortium, or both.

  some fields, such as taxonomy, do appear as separate elements in GenBank
    format but without a specific linetype (in GenBank format this comes
    under ORGANISM). Another example is the separation of primary accession
    from the list of secondary accessions. In GenBank format primary
    accession is just the first one on the list that includes all secondaries
    after it.

  create-date deserves special comment. The date you see on the right hand
    side of the LOCUS line in GenBank format is actually the last date the
    the record was modified (or the update-date). The date the record was
    first submitted to GenBank appears in the first submission citation in
    the reference section. Internally in the databases and ASN.1 NCBI keeps
    the first date the record was released into the sequence database at
    NCBI as create-date. For records from EMBL, which supports create-date,
    it is the date provided by EMBL. For DDBJ records, which do not supply
    a create-date (same as GenBank format) the create-date is the first date
    NCBI saw the record from DDBJ. For older GenBank records, before NCBI
    took responsibility for GenBank, it is just the first date NCBI saw the
    record. Create-date can be very useful, so we expose it here, but users
    must understand it is only an approximation and comes from many sources,
    and with many exceptions and caveats. It does NOT tell you the first
    date the public might have seen this record and thus is NOT an accurate
    measure for legal issues of precedence.

********
-->
<xs:element name="GBSet">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="tns:GBSeq"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBSeq">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="GBSeq_locus" type="xs:string"/>
      <xs:element name="GBSeq_length" type="xs:integer"/>
      <xs:element name="GBSeq_strandedness" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_moltype" type="xs:string"/>
      <xs:element name="GBSeq_topology" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_division" type="xs:string"/>
      <xs:element name="GBSeq_update-date" type="xs:string"/>
      <xs:element name="GBSeq_create-date" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_update-release" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_create-release" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_definition" type="xs:string"/>
      <xs:element name="GBSeq_primary-accession" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_entry-version" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_accession-version" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_other-seqids" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:GBSeqid"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBSeq_secondary-accessions" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:GBSecondary-accn"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBSeq_project" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_keywords" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:GBKeyword"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBSeq_segment" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_source" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_organism" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_taxonomy" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_references" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:GBReference"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBSeq_comment" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_tagset" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:GBTagset"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBSeq_primary" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_source-db" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_database-reference" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_feature-table" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:GBFeature"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
<!-- Optional for other dump forms -->
      <xs:element name="GBSeq_sequence" type="xs:string" minOccurs="0"/>
      <xs:element name="GBSeq_contig" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBSecondary-accn" type="xs:string"/>

<xs:element name="GBSeqid" type="xs:string"/>

<xs:element name="GBKeyword" type="xs:string"/>

<xs:element name="GBAuthor" type="xs:string"/>

<xs:element name="GBReference">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="GBReference_reference" type="xs:string"/>
      <xs:element name="GBReference_position" type="xs:string" minOccurs="0"/>
      <xs:element name="GBReference_authors" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:GBAuthor"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBReference_consortium" type="xs:string" minOccurs="0"/>
      <xs:element name="GBReference_title" type="xs:string" minOccurs="0"/>
      <xs:element name="GBReference_journal" type="xs:string"/>
      <xs:element name="GBReference_xref" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:GBXref"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBReference_pubmed" type="xs:integer" minOccurs="0"/>
      <xs:element name="GBReference_remark" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBXref">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="GBXref_dbname" type="xs:string"/>
      <xs:element name="GBXref_id" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBTagset">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="GBTagset_authority" type="xs:string" minOccurs="0"/>
      <xs:element name="GBTagset_version" type="xs:string" minOccurs="0"/>
      <xs:element name="GBTagset_url" type="xs:string" minOccurs="0"/>
      <xs:element name="GBTagset_tags" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:GBTags"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBTags">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="tns:GBTag"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBTag">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="GBTag_name" type="xs:string" minOccurs="0"/>
      <xs:element name="GBTag_value" type="xs:string" minOccurs="0"/>
      <xs:element name="GBTag_unit" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBFeature">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="GBFeature_key" type="xs:string"/>
      <xs:element name="GBFeature_location" type="xs:string"/>
      <xs:element name="GBFeature_intervals" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:GBInterval"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBFeature_operator" type="xs:string" minOccurs="0"/>
      <xs:element name="GBFeature_partial5" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBFeature_partial3" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBFeature_quals" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:GBQualifier"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBInterval">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="GBInterval_from" type="xs:integer" minOccurs="0"/>
      <xs:element name="GBInterval_to" type="xs:integer" minOccurs="0"/>
      <xs:element name="GBInterval_point" type="xs:integer" minOccurs="0"/>
      <xs:element name="GBInterval_iscomp" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBInterval_interbp" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBInterval_accession" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBQualifier">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="GBQualifier_name" type="xs:string"/>
      <xs:element name="GBQualifier_value" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBTagsetRules">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="GBTagsetRules_authority" type="xs:string" minOccurs="0"/>
      <xs:element name="GBTagsetRules_version" type="xs:string" minOccurs="0"/>
      <xs:element name="GBTagsetRules_mandatorytags" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:GBTagNames"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBTagsetRules_optionaltags" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:GBTagNames"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBTagsetRules_uniquetags" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:GBTagNames"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GBTagsetRules_extensible" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBTagNames">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element name="GBTagNames_E" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="GBTagsetRuleSet">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="tns:GBTagsetRules"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>


<!--
  INSDSeq provides the elements of a sequence as presented in the
    GenBank/EMBL/DDBJ-style flatfile formats, with a small amount of
    additional structure.
    Although this single perspective of the three flatfile formats
    provides a useful simplification, it hides to some extent the
    details of the actual data underlying those formats. Nevertheless,
    the XML version of INSD-Seq is being provided with
    the hopes that it will prove useful to those who bulk-process
    sequence data at the flatfile-format level of detail. Further 
    documentation regarding the content and conventions of those formats 
    can be found at:

    URLs for the DDBJ, EMBL, and GenBank Feature Table Document:
    http://www.ddbj.nig.ac.jp/FT/full_index.html
    http://www.ebi.ac.uk/embl/Documentation/FT_definitions/feature_table.html
    http://www.ncbi.nlm.nih.gov/projects/collab/FT/index.html

    URLs for DDBJ, EMBL, and GenBank Release Notes :
    ftp://ftp.ddbj.nig.ac.jp/database/ddbj/ddbjrel.txt
    http://www.ebi.ac.uk/embl/Documentation/Release_notes/current/relnotes.html
    ftp://ftp.ncbi.nih.gov/genbank/gbrel.txt

    Because INSDSeq is a compromise, a number of pragmatic decisions have
    been made:

  In pursuit of simplicity and familiarity a number of fields do not
    have full substructure defined here where there is already a
    standard flatfile format string. For example:

   Dates:      DD-MON-YYYY (eg 10-JUN-2003)

   Author:     LastName, Initials  (eg Smith, J.N.)
            or Lastname Initials   (eg Smith J.N.)

   Journal:    JournalName Volume (issue), page-range (year)
            or JournalName Volume(issue):page-range(year)
            eg Appl. Environ. Microbiol. 61 (4), 1646-1648 (1995)
               Appl. Environ. Microbiol. 61(4):1646-1648(1995).

  FeatureLocations are representated as in the flatfile feature table,
    but FeatureIntervals may also be provided as a convenience

  FeatureQualifiers are represented as in the flatfile feature table.

  Primary has a string that represents a table to construct
    a third party (TPA) sequence.

  other-seqids can have strings with the "vertical bar format" sequence
    identifiers used in BLAST for example, when they are non-INSD types.

  Currently in flatfile format you only see Accession numbers, but there 
    are others, like patents, submitter clone names, etc which will 
    appear here

  There are also a number of elements that could have been more exactly
    specified, but in the interest of simplicity have been simply left as
    optional. For example:

  All publicly accessible sequence records in INSDSeq format will
    include accession and accession.version. However, these elements are 
    optional in optional in INSDSeq so that this format can also be used   
    for non-public sequence data, prior to the assignment of accessions and 
    version numbers. In such cases, records will have only "other-seqids".

  sequences will normally all have "sequence" filled in. But contig records
    will have a "join" statement in the "contig" slot, and no "sequence".
    We also may consider a retrieval option with no sequence of any kind
    and no feature table to quickly check minimal values.

  Four (optional) elements are specific to records represented via the EMBL
    sequence database: INSDSeq_update-release, INSDSeq_create-release,
    INSDSeq_entry-version, and INSDSeq_database-reference.

  One (optional) element is specific to records originating at the GenBank
    and DDBJ sequence databases: INSDSeq_segment.

********
-->
<xs:element name="INSDSet">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="tns:INSDSeq"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="INSDSeq">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="INSDSeq_locus" type="xs:string"/>
      <xs:element name="INSDSeq_length" type="xs:integer"/>
      <xs:element name="INSDSeq_strandedness" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_moltype" type="xs:string"/>
      <xs:element name="INSDSeq_topology" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_division" type="xs:string"/>
      <xs:element name="INSDSeq_update-date" type="xs:string"/>
      <xs:element name="INSDSeq_create-date" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_update-release" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_create-release" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_definition" type="xs:string"/>
      <xs:element name="INSDSeq_primary-accession" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_entry-version" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_accession-version" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_other-seqids" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:INSDSeqid"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDSeq_secondary-accessions" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:INSDSecondary-accn"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDSeq_project" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_keywords" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:INSDKeyword"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDSeq_segment" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_source" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_organism" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_taxonomy" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_references" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:INSDReference"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDSeq_comment" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_tagset" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:INSDTagset"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDSeq_primary" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_source-db" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_database-reference" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_feature-table" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:INSDFeature"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
<!-- Optional for other dump forms -->
      <xs:element name="INSDSeq_sequence" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDSeq_contig" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="INSDSeqid" type="xs:string"/>

<xs:element name="INSDSecondary-accn" type="xs:string"/>

<xs:element name="INSDKeyword" type="xs:string"/>

<!--
 INSDReference_position contains a string value indicating the
 basepair span(s) to which a reference applies. The allowable
 formats are:
 
   X..Y  : Where X and Y are integers separated by two periods,
           X >= 1 , Y <= sequence length, and X <= Y 

           Multiple basepair spans can exist, separated by a
           semi-colon and a space. For example : 10..20; 100..500
             
   sites : The string literal 'sites', indicating that a reference
           provides sequence annotation information, but the specific
           basepair spans are either not captured, or were too numerous
           to record.
 
           The 'sites' literal string is singly occuring, and
            cannot be used in conjunction with any X..Y basepair spans.
 
   References that lack an INSDReference_position element apply
   to the entire sequence.
-->
<xs:element name="INSDAuthor" type="xs:string"/>

<xs:element name="INSDReference">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="INSDReference_reference" type="xs:string"/>
      <xs:element name="INSDReference_position" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDReference_authors" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:INSDAuthor"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDReference_consortium" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDReference_title" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDReference_journal" type="xs:string"/>
      <xs:element name="INSDReference_xref" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:INSDXref"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDReference_pubmed" type="xs:integer" minOccurs="0"/>
      <xs:element name="INSDReference_remark" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<!--
 INSDXref provides a method for referring to records in
 other databases. INSDXref_dbname is a string value that
 provides the name of the database, and INSDXref_dbname
 is a string value that provides the record's identifier
 in that database.
-->
<xs:element name="INSDXref">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="INSDXref_dbname" type="xs:string"/>
      <xs:element name="INSDXref_id" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<!--
 INSDTagset is used for community-specific data elements
 in a tag/value format.
-->
<xs:element name="INSDTagset">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="INSDTagset_authority" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDTagset_version" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDTagset_url" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDTagset_tags" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:INSDTags"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="INSDTags">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="tns:INSDTag"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="INSDTag">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="INSDTag_name" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDTag_value" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDTag_unit" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<!--
 INSDFeature_operator contains a string value describing
 the relationship among a set of INSDInterval within
 INSDFeature_intervals. The allowable formats are:
 
   join :  The string literal 'join' indicates that the
           INSDInterval intervals are biologically joined
           together into a contiguous molecule.
 
   order : The string literal 'order' indicates that the
           INSDInterval intervals are in the presented
           order, but they are not necessarily contiguous.
 
   Either 'join' or 'order' is required if INSDFeature_intervals
   is comprised of more than one INSDInterval .
-->
<xs:element name="INSDFeature">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="INSDFeature_key" type="xs:string"/>
      <xs:element name="INSDFeature_location" type="xs:string"/>
      <xs:element name="INSDFeature_intervals" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:INSDInterval"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDFeature_operator" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDFeature_partial5" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDFeature_partial3" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDFeature_quals" minOccurs="0">
        <xs:complexType>
          <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element ref="tns:INSDQualifier"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<!--
 INSDInterval_iscomp is a boolean indicating whether
 an INSDInterval_from / INSDInterval_to location
 represents a location on the complement strand.
 When INSDInterval_iscomp is TRUE, it essentially
 confirms that a 'from' value which is greater than
 a 'to' value is intentional, because the location
 is on the opposite strand of the presented sequence.
 INSDInterval_interbp is a boolean indicating whether
 a feature (such as a restriction site) is located
 between two adjacent basepairs. When INSDInterval_iscomp
 is TRUE, the 'from' and 'to' values must differ by
 exactly one base.
-->
<xs:element name="INSDInterval">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="INSDInterval_from" type="xs:integer" minOccurs="0"/>
      <xs:element name="INSDInterval_to" type="xs:integer" minOccurs="0"/>
      <xs:element name="INSDInterval_point" type="xs:integer" minOccurs="0"/>
      <xs:element name="INSDInterval_iscomp" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDInterval_interbp" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDInterval_accession" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="INSDQualifier">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="INSDQualifier_name" type="xs:string"/>
      <xs:element name="INSDQualifier_value" type="xs:string" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<!--
 INSDTagsetRules defines mandatory, optional, and unique tags
 for a given community's INSDTagset. If the tagset is extensible,
 then additional tags which are not included in the list of
 mandatory or optional tags may be present. The uniquetags
 element provides a list of the tags that may occur only once
 in a given tagset.
-->
<xs:element name="INSDTagsetRules">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="INSDTagsetRules_authority" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDTagsetRules_version" type="xs:string" minOccurs="0"/>
      <xs:element name="INSDTagsetRules_mandatorytags" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:INSDTagNames"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDTagsetRules_optionaltags" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:INSDTagNames"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDTagsetRules_uniquetags" minOccurs="0">
        <xs:complexType>
          <xs:sequence>
            <xs:element ref="tns:INSDTagNames"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="INSDTagsetRules_extensible" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="value" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="true"/>
                <xs:enumeration value="false"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="INSDTagNames">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element name="INSDTagNames_E" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

<xs:element name="INSDTagsetRuleSet">
  <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="tns:INSDTagsetRules"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>


<xs:include schemaLocation="efetch_seq.xsd" />

  <xs:complexType name="IdListType">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Id" type="xs:string" />
    </xs:sequence>
  </xs:complexType>

<!-- Request/Response -->

  <xs:element name="eFetchRequest">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" name="db" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="id" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="WebEnv" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="query_key" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="tool" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="email" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="retstart" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="retmax" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="rettype" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="strand" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="seq_start" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="seq_stop" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="complexity" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="report" type="xs:string" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  
  <xs:element name="eFetchResult">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" name="ERROR" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" ref="tns:TSeqSet"/>
        <xs:element minOccurs="0" maxOccurs="1" ref="tns:GBSet" />
        <xs:element minOccurs="0" maxOccurs="1" ref="tns:INSDSet" />
        <!-- xs:element minOccurs="0" maxOccurs="1" name="Bioseq-set" type="tns:Bioseq-setType" / -->
        <xs:element minOccurs="0" maxOccurs="1" name="IdList" type="tns:IdListType" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>
    </types>


    <message name="eFetchRequest_m">
        <part name="inpp" element="nsef:eFetchRequest"/>
    </message>
    <message name="eFetchResponse_m">
        <part name="outp" element="nsef:eFetchResult"/>
    </message>

    <portType name="eUtilsServiceSoap">
        <operation name="run_eFetch">
            <input message="s0:eFetchRequest_m"/>
            <output message="s0:eFetchResponse_m"/>
        </operation>
    </portType>

    <binding name="eUtilsServiceSoap" type="s0:eUtilsServiceSoap">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="run_eFetch">
            <soap:operation soapAction="efetch" style="document"/>
            <input>
                <soap:body use="literal"  />
            </input>
            <output>
                <soap:body use="literal" />
            </output>
        </operation>
    </binding>

    <service name="eFetchSequenceService">
        <port name="eUtilsServiceSoap" binding="s0:eUtilsServiceSoap">
            <soap:address location="http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/soap_adapter_2_0.cgi"/>
        </port>
    </service>
    
</wsdl:definitions>