Schemas Listed by MsgType (NS#RootNode):
#FIDCCH01 (note: no namespace)
#FIDCCP01 (note: no namespace)
Learning.BizTalk2004.SchemaReuse.Schemas#NewDocument1 (note: has
a namespace)
(NS info given above because I know it plays into whether you Import,
Include or Redefine)
I'd like my NewDocument1 to have these two (somewhat buried) node
structures defined / referenced / re-used in it:
FIDCCH01/IDOC/E1FIREF
Trying to re-use this as NewDocument1/IDOCS/IDOC/E1FIREF
FIDCCP01/IDOC/E1FIKPF
Trying to re-use this as NewDocument1/IDOCS/IDOC/E1FIKPF
I'm struggling to find a way to define the data type and etc of
these buried nodes inside the FIDCCH01 and FIDCCP01 schemas such that
they're defined and exposed as global complex data types that can be
reused in a new schema when imported/include/redefined.
In FIDCCH01.xsd and FIDCCP01.xsd, I've taken the following steps:
* Select the node to be made into a complex data type.
* Set its Content Type to 'ComplexContent'
* Set its Data Structure Type to Global<Node's Name>Type.
* And then saved the resulting XSD changes before working on the
NewDocument1Schema.xsd.
In my NewDocument1 schema, if I Import the XSD's then the only data
type I see to set a new record node to is 'NewDocument1 (Reference), or
xs:anyType'. I don't see any of the global complex types that I think
I've created in the imported XSD's.
In my NewDocument 1 schema, if I Include the XSD's, then I get the
error like "Type 'GlobalE1FIREFType' is not declared. An error occured
at file://<FIDCCH01.xsd's filename> (<line number of error>, <column of
error>)". So I can't import the schema where I tried to create the
global complex data type.
I'm running BTS 2004 with SP1. Any ideas on what I'm doing wrong?
I've tinkered to the point that I have little/no schedule left, but
would really like to re-use these schemas (or schema nodes really) in
what I'm thinking is the right way.
To get by, I've (via NotePad) physically copied the xsd node
structure data into place right inside the New Document1.XSD, but I'd
really rather use BizTalk's Editor tool to do what I'm thinking it
should be able to do. When or if my (SAP) target changes their schema,
they'll send me the whole FIDCCH01 and FIDCCP01 schemas, each of which
includes a duplicated rather than referenced node and that will create
work for me in getting any changes or updates incorporated into
NewDocument1 in the future.
If it helps, I can provide the actual schemas, but I'm thinking the
info above probably will have the basics covered.
Thanks in advance - Any help appreciated!
It sure would help to see the specific files. At the very least, could you
provide the definitions for each of the types? Are you sure that you've
converted the original element definitions you want to reuse in the base
schemas into a named complex types?
--
Tomas Restrepo
tom...@mvps.org
http://www.winterdom.com/
You can read about this stuff in the Help for BizTalk 2006. (not 2004) There
is good explanation of inhetitance in XSD.
--
Regards,
Leonid Ganeline
BizTalk Developer, MCSD
http://geekswithblogs.net/leonidganeline/
"HablaElBiz" <Curtis....@gmail.com> wrote in message
news:1143578761.7...@i40g2000cwc.googlegroups.com...
Cool to have either of you respond to my post.
I don't have access to BizTalk 2006 at this time. (or is the help
file available somewhere online?).
Here are the Schemas that I'm talking about. I had to shorten the
re-used ones to fit the allowed 190,000 characters per post limit, but
the nodes removed are not important ones to this issue/question.
The to-be re-used schemas are as they sit with my attempt at having
created global complex types.
*************************************************************************************
*************************************************************************************
*************************************************************************************
(Note - RecOne and RecTwo were to be records that I would like to set
to use the imported/included data types: Global E1FIREFType and
GlobalE1FIKPFType)
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://Learning.BizTalk2004.SchemaReuse.Schemas"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://Learning.BizTalk2004.SchemaReuse.Schemas"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import schemaLocation=".\fidccp01.xsd" />
<xs:import schemaLocation=".\fidcch01.xsd" />
<xs:element name="NewDocument1">
<xs:complexType>
<xs:sequence>
<xs:element name="IDOCS">
<xs:complexType>
<xs:sequence>
<xs:element name="IDOC">
<xs:complexType>
<xs:sequence>
<xs:element name="RecOne">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="RecTwo">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
*************************************************************************************
*************************************************************************************
*************************************************************************************
<?xml version="1.0" encoding="utf-16"?>
<xsd:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="FIDCCH01">
<xsd:annotation>
<xsd:documentation>IDoc for FI document changes (dunning
block)</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="IDOC">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="EDI_DC40">
<xsd:annotation>
<xsd:documentation>IDoc Control Record for Interface
to External System</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="DOCREL">
<xsd:annotation>
<xsd:documentation>SAP Release for
IDoc</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="4" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="SERIAL">
<xsd:annotation>
<xsd:documentation>Serialization</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SEGMENT" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="999999" name="E1FIREF"
type="GlobalE1FIREFType">
<xsd:annotation>
<xsd:documentation>IDoc for document changes:
Reference to document and line</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="BEGIN" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="GlobalE1FIREFType">
<xsd:complexContent mixed="true">
<xsd:extension base="xsd:anyType">
<xsd:sequence>
<xsd:element minOccurs="0" name="AWTYP">
<xsd:annotation>
<xsd:documentation>Reference
procedure</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="5" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="GJAHR">
<xsd:annotation>
<xsd:documentation>Fiscal Year</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d+" />
<xsd:maxLength value="4" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="999999" name="E1FICHD">
<xsd:annotation>
<xsd:documentation>IDoc for changes to an FI document:
Data to be changed</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="TABNAME">
<xsd:annotation>
<xsd:documentation>Table Name</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="FDNAME">
<xsd:annotation>
<xsd:documentation>Field Name</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="OLDVAL">
<xsd:annotation>
<xsd:documentation>Receipt: Old Field
Contents</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="NEWVAL">
<xsd:annotation>
<xsd:documentation>Receipt: New Field
Contents</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SEGMENT" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SEGMENT" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
*************************************************************************************
*************************************************************************************
*************************************************************************************
<?xml version="1.0" encoding="utf-16"?>
<xsd:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="FIDCCP01">
<xsd:annotation>
<xsd:documentation>IDoc: Complete FI document</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="IDOC">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="EDI_DC40">
<xsd:annotation>
<xsd:documentation>IDoc Control Record for Interface
to External System</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="DOCREL">
<xsd:annotation>
<xsd:documentation>SAP Release for
IDoc</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="4" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="SERIAL">
<xsd:annotation>
<xsd:documentation>Serialization</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SEGMENT" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="E1FIKPF" type="GlobalE1FIKPFType">
<xsd:annotation>
<xsd:documentation>FI Document Header
(BKPF)</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="BEGIN" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="GlobalE1FIKPFType">
<xsd:complexContent mixed="true">
<xsd:extension base="xsd:anyType">
<xsd:sequence>
<xsd:element minOccurs="0" name="BUKRS">
<xsd:annotation>
<xsd:documentation>Name of global company
code</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="6" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="XBLNR_LONG">
<xsd:annotation>
<xsd:documentation>Reference Document Number (for
Dependencies see Long Text)</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="35" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="999" name="E1FISEG">
<xsd:annotation>
<xsd:documentation>FI Document Item
(BSEG)</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="BUZEI">
<xsd:annotation>
<xsd:documentation>Number of Line Item Within
Accounting Document</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="XCPDD">
<xsd:annotation>
<xsd:documentation>Indicator: Address and bank data
set individually</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="E1FINBU">
<xsd:annotation>
<xsd:documentation>FI Subsidiary Ledger (FI-AP-AR)
(BSEG)</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="UMSKZ">
<xsd:annotation>
<xsd:documentation>Special G/L
Indicator</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="RESERVE">
<xsd:annotation>
<xsd:documentation>Character field length
50</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SEGMENT" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SEGMENT" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="999" name="E1FISEC">
<xsd:annotation>
<xsd:documentation>CPD Customer/Vendor
(BSEC)</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="ADRNR">
<xsd:annotation>
<xsd:documentation>Address</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SEGMENT" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="999" name="E1FISET">
<xsd:annotation>
<xsd:documentation>FI Tax Data (BSET)</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="BUZEI">
<xsd:annotation>
<xsd:documentation>Number of Line Item Within
Accounting Document</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="TXMOD">
<xsd:annotation>
<xsd:documentation>Tax Result Has Been Modified
Manually</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="3" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SEGMENT" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="SEGMENT" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="1" />
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
*************************************************************************************
*************************************************************************************
*************************************************************************************
I know there's got to be only a few steps involved that somehow I have
not found the right combination or order of. (sorry to be a bother,
but) If you figure it out, could you break it down step-by-step?
Thanks again,
- Curtis
>
> Cool to have either of you respond to my post.
>
> I don't have access to BizTalk 2006 at this time. (or is the help
> file available somewhere online?).
>
> Here are the Schemas that I'm talking about. I had to shorten the
> re-used ones to fit the allowed 190,000 characters per post limit, but
> the nodes removed are not important ones to this issue/question.
>
> The to-be re-used schemas are as they sit with my attempt at having
> created global complex types.
I've responded to your personal mail already, but I'll copy the answer here;
others might find it useful.
Here's what I wrote to Curtis:
1- Making the elements you have in the reusable schemas into global
complexTypes correctly is easy: Just select the element you want to turn
into a global complexType and in the properties window, set the Data
Structure Type to the name you want to give your complexType. Example, name
it E1FIKPF_CT, then save your schema. That will do it correctly.
2- Referencing this usually is very easy: Just import (<xs:import>) the
schema, create a new "Child Element Node", and then set the DataType
property (or a Child Record and set the Data Structure Type property) to the
complexType you created in step 1.
The real catch as to why it didn't work for you is because, indeed, your
imported schemas have no targetNamespace. Now, this is perfectly valid in
XSD, however, it confuses the biztalk editor because of the defaults it
uses. See, you cannot create a prefixed namespace declaration for the empty
("") namespace, and, unfortunately, biztalk schemas by default have the
default namespace set at the root to the targetNamespace of the schema
you're creating. Thus, you have no real way to reference the imported types
(since doing it unqualified form would point to types created in the same
XSD and not in the imported ones, and you can't qualify them either).
The solution is actually very simple: Just hand edit the schema to make sure
that the default namespace is not getting changed (i.e. change
xmlns="http://Learning.BizTalk2004.SchemaReuse.Schemas", to, say,
xmlns:h="http://Learning.BizTalk2004.SchemaReuse.Schemas". After that, the
complexTypes you imported will correctly appear and biztalk will let you
reference them correctly!