BizTalk Server Framework - Biztalk message creation without Schema in the project

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Framework > November 2004 > Biztalk message creation without Schema in the project





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 Biztalk message creation without Schema in the project
Raj

2004-06-10, 5:31 pm

Hi,
Iam having lots of problem while validating the schemas,even though they are correct.Iam able to validate the schemas externally using XML Spy tools.
Hence is there a way I can create a message input in Biztalk without specifying the schema or including it in the project?
Thanks
Raj
Christof

2004-06-20, 11:08 pm

Try validation of the schemas using the VS.NET schema editor (not the
biztalk editor). If both the biztalk editor and VS.NET tell you that the
schema is fine, you're on the right track. HOWEVER: if they tell you the
schema is not valid, you're probably having troubles with schema
determination.

Schema's in .NET should be deterministic. Non-deterministic schemas (as XML
Spy allows you to make!! Bad bad bad tool.... ;-) ) are not supported.
This is actually within the spirit of the XML schema spec: they explicitly
mention that parsers should NOT support non deterministic schemas and that
writing non-deterministic schema's is a rather bad practice...

Just a guess... you should check :-)
Hope this helps,
Best regards,

Christof


"Raj" <Raj@discussions.microsoft.com> wrote in message
news:45BFEDB1-7B4B-4CB2-A523-9D41A193025D@microsoft.com...
> Hi,
> Iam having lots of problem while validating the schemas,even though they

are correct.Iam able to validate the schemas externally using XML Spy tools.
> Hence is there a way I can create a message input in Biztalk without

specifying the schema or including it in the project?
> Thanks
> Raj



Raj

2004-06-20, 11:08 pm

Chris,
Thanks a lot for the response.
Iam using the following approaches to refer external schemas from the schema Iam validating
1. Storing all the external schemas in my localwebsite
I store all my external schemas in my localwebsite and when I refer to that by using
xsi:schemaLocation="http://localhost/external.xsd"
its not able to validate /locate the reference
2. Adding all the external schema as part of the VisualStudio project
I added all the external schema to the validating schema's project and used a relative path reference to it, still no luck
For e.g if the project structure is as below
Exampleproject
--validate.xsd
--SchemaFolder
---external.xsd
then, in my validating schema (validate.xsd), Iam using
xsi:schemaLocation="SchemaFolder/external.xsd" to refer it..But still no luck!
Since I have a chain of external reference schema called in my project, it makes it even worser
Any thoughts?
Thanks a lot for the resposne, again
Raj

from the schema Iam validating on

"Christof" wrote:

> Try validation of the schemas using the VS.NET schema editor (not the
> biztalk editor). If both the biztalk editor and VS.NET tell you that the
> schema is fine, you're on the right track. HOWEVER: if they tell you the
> schema is not valid, you're probably having troubles with schema
> determination.
>
> Schema's in .NET should be deterministic. Non-deterministic schemas (as XML
> Spy allows you to make!! Bad bad bad tool.... ;-) ) are not supported.
> This is actually within the spirit of the XML schema spec: they explicitly
> mention that parsers should NOT support non deterministic schemas and that
> writing non-deterministic schema's is a rather bad practice...
>
> Just a guess... you should check :-)
> Hope this helps,
> Best regards,
>
> Christof
>
>
> "Raj" <Raj@discussions.microsoft.com> wrote in message
> news:45BFEDB1-7B4B-4CB2-A523-9D41A193025D@microsoft.com...
> are correct.Iam able to validate the schemas externally using XML Spy tools.
> specifying the schema or including it in the project?
>
>
>

Christof

2004-06-20, 11:08 pm

You explicitly need to tell the editor to import or include schemas.
To do this, select your schema's root node and check your properties pane.

More information is in the docs. Search for: "Creating Schemas That Use
Other Schemas"

You need to deploy each of the schemas you refer or link to into the biztalk
server.
You'll need a reference to each of those schemas as well.

Best regards,
Christof

"Raj" <Raj@discussions.microsoft.com> wrote in message
news:03F53CFF-4B40-4404-B92D-FD11847AA625@microsoft.com...
> Chris,
> Thanks a lot for the response.
> Iam using the following approaches to refer external schemas from the

schema Iam validating
> 1. Storing all the external schemas in my localwebsite
> I store all my external schemas in my localwebsite and when I refer to

that by using
> xsi:schemaLocation="http://localhost/external.xsd"
> its not able to validate /locate the reference
> 2. Adding all the external schema as part of the VisualStudio project
> I added all the external schema to the validating schema's project and

used a relative path reference to it, still no luck
> For e.g if the project structure is as below
> Exampleproject
> --validate.xsd
> --SchemaFolder
> ---external.xsd
> then, in my validating schema (validate.xsd), Iam using
> xsi:schemaLocation="SchemaFolder/external.xsd" to refer it..But still no

luck!
> Since I have a chain of external reference schema called in my project, it

makes it even worser[vbcol=seagreen]
> Any thoughts?
> Thanks a lot for the resposne, again
> Raj
>
> from the schema Iam validating on
>
> "Christof" wrote:
>
the[vbcol=seagreen]
the[vbcol=seagreen]
XML[vbcol=seagreen]
explicitly[vbcol=seagreen]
that[vbcol=seagreen]
they[vbcol=seagreen]
tools.[vbcol=seagreen]


Raj

2004-07-01, 5:52 pm

Christof,
Can you please clarify the following

Here are some of the questions which Iam having a hard time to find the right solution

1. Biztalk XSD validation
Iam trying to validate a bunch of schemas as part of the biztalk project and all these schemas refer external schemas which are
also part of the project.When I try to validate it, I end up getting the following error
"The Schema has a TypeName that collide with the RootNode TypeName of one of its root nodes. Make sure that they are different"

The weird thing is when I change the XML schema name to something else it works fine within MSXML.

I would be more happy to share the solution file containing the schemas if you are interested(Iam using MSXML4.0 SP2)

2. Message creation
Ok, After changing the XSD filename as I said above, Iam able to generate an assembly out of it and place it in GAC
Now in my biztalk orchestration , When I try to define a message by pointing to one of the schemas as the message type, it doesnt allow me to select the entire schema rather it allows me to use one of the types under it!
Why cant I have my message type as the entire schema?


3. XmlValidatingReader
Is the biztalk engine XML validator same as the XmlValidatingReader class?Because for some schemas Iam able to validate the XML/XSD using XmlValidatingReader but not thro' Biztalk!

So if anyone can help me out or point the right direction, I would really appreciate it
Thanks
Raj

"Christof" wrote:

> You explicitly need to tell the editor to import or include schemas.
> To do this, select your schema's root node and check your properties pane.
>
> More information is in the docs. Search for: "Creating Schemas That Use
> Other Schemas"
>
> You need to deploy each of the schemas you refer or link to into the biztalk
> server.
> You'll need a reference to each of those schemas as well.
>
> Best regards,
> Christof
>
> "Raj" <Raj@discussions.microsoft.com> wrote in message
> news:03F53CFF-4B40-4404-B92D-FD11847AA625@microsoft.com...
> schema Iam validating
> that by using
> used a relative path reference to it, still no luck
> luck!
> makes it even worser
> the
> the
> XML
> explicitly
> that
> they
> tools.
>
>
>

Christof [MVP BizTalk Server]

2004-07-05, 7:48 am

Hi Raj,

It seems like you have defined some type in your XML Schema that has same
typename as your root node. Try changing your rootnode's typename and let
me know. This does not change any meanings within your schema or with
regards to the validation. (The type name is only used as a matter of being
able to refer to that type.)

For your information .NET builds upon the MSXML 3 bits as far as I know.

What do you mean with: "Why cant I have my message type as the entire
schema" please?
Your schema may define several XML types. BizTalk Server cannot know witch
of those to apply as the type of your message. You'll have to specify this.

Regarding your third concern: please provide me with more detail. Which
constructs are not supported? I'm not sure which parser is being used. I'm
highly interested if you have a repro. (Preferrable without too many
imports/referals to other schemas.)

So far my first posting as a BizTalk Server MVP :-)))

Best regards!
Christof [Microsoft BizTalk Server MVP]

"Raj" <Raj@discussions.microsoft.com> wrote in message
news:B2B69BB0-1EDF-4C71-B0A6-E3E3736C37D4@microsoft.com...
> Christof,
> Can you please clarify the following
>
> Here are some of the questions which Iam having a hard time to find the

right solution
>
> 1. Biztalk XSD validation
> Iam trying to validate a bunch of schemas as part of the biztalk project

and all these schemas refer external schemas which are
> also part of the project.When I try to validate it, I end up getting the

following error
> "The Schema has a TypeName that collide with the RootNode TypeName of one

of its root nodes. Make sure that they are different"
>
> The weird thing is when I change the XML schema name to something else it

works fine within MSXML.
>
> I would be more happy to share the solution file containing the schemas if

you are interested(Iam using MSXML4.0 SP2)
>
> 2. Message creation
> Ok, After changing the XSD filename as I said above, Iam able to generate

an assembly out of it and place it in GAC
> Now in my biztalk orchestration , When I try to define a message by

pointing to one of the schemas as the message type, it doesnt allow me to
select the entire schema rather it allows me to use one of the types under
it!
> Why cant I have my message type as the entire schema?
>
>
> 3. XmlValidatingReader
> Is the biztalk engine XML validator same as the XmlValidatingReader

class?Because for some schemas Iam able to validate the XML/XSD using
XmlValidatingReader but not thro' Biztalk!
>
> So if anyone can help me out or point the right direction, I would really

appreciate it[vbcol=seagreen]
> Thanks
> Raj
>
> "Christof" wrote:
>
pane.[vbcol=seagreen]
biztalk[vbcol=seagreen]
no[vbcol=seagreen]
project, it[vbcol=seagreen]
the[vbcol=seagreen]
that[vbcol=seagreen]
you[vbcol=seagreen]
(as[vbcol=seagreen]
supported.[vbcol=seagreen]
and[vbcol=seagreen]
though[vbcol=seagreen]
Spy[vbcol=seagreen]
without[vbcol=seagreen]


Raj

2004-07-09, 3:32 pm

Chris,
Congrats on ur MVP and thanks again for answering my questions.

1. I agree with you that if I change the rootnode's typename,it allows me to validate but the schemas are from a standard body(STAR/OAGIS) and Iam not supposed to edit anything w.r.to schema except for referencing them to validate.

2. Even, if Iam able to validate the schema and define a message type by referencing the schema within the project, for some reason Iam getting a runtime parse errror when i send a sample message (which is nothing but an output of the "generate instance"
option).

3. I have attached the sample schema below (275 lines) which gets validates when I use XMLValidator or VS.net2003-->File-->Open-->File & then Schema-->Validate Schema.
But when I add the schema as part of the Biztalk project and then try to validate the schema, no good and complains that all the
"www.w3.org" reference does not exist in the current project.

Sample schema:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Some parsers may require explicit declaration of xmlns:xml="http://www.w3.org/XML/1998/namespace"
In that case, a copy of this schema augmented with the above declaration should be cached and used
for the purpose of schema validation on ebXML messages. -->
<schema targetNamespace="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
xmlns:tns="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified"
version="2.0">
<import namespace="http://www.w3.org/2000/09/xmldsig#"
schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
<import namespace="http://www.w3.org/1999/xlink"
schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/xlink.xsd"/>
<import namespace="http://schemas.xmlsoap.org/soap/envelope/"
schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"/>
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
<!-- MANIFEST, for use in soap:Body element -->
<element name="Manifest">
<complexType>
<sequence>
<element ref="tns:Reference" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:bodyExtension.grp"/>
</complexType>
</element>
<element name="Reference">
<complexType>
<sequence>
<element ref="tns:Schema" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute ref="tns:id"/>
<attribute ref="xlink:type" fixed="simple"/>
<attribute ref="xlink:href" use="required"/>
<attribute ref="xlink:role"/>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
</element>
<element name="Schema">
<complexType>
<attribute name="location" type="anyURI" use="required"/>
<attribute name="version" type="tns:non-empty-string"/>
</complexType>
</element>
<!-- MESSAGEHEADER, for use in soap:Header element -->
<element name="MessageHeader">
<complexType>
<sequence>
<element ref="tns:From"/>
<element ref="tns:To"/>
<element ref="tns:CPAId"/>
<element ref="tns:ConversationId"/>
<element ref="tns:Service"/>
<element ref="tns:Action"/>
<element ref="tns:MessageData"/>
<element ref="tns:DuplicateElimination" minOccurs="0"/>
<element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
</complexType>
</element>
<element name="CPAId" type="tns:non-empty-string"/>
<element name="ConversationId" type="tns:non-empty-string"/>
<element name="Service">
<complexType>
<simpleContent>
<extension base="tns:non-empty-string">
<attribute name="type" type="tns:non-empty-string"/>
</extension>
</simpleContent>
</complexType>
</element>
<element name="Action" type="tns:non-empty-string"/>
<element name="MessageData">
<complexType>
<sequence>
<element ref="tns:MessageId"/>
<element ref="tns:Timestamp"/>
<element ref="tns:RefToMessageId" minOccurs="0"/>
<element ref="tns:TimeToLive" minOccurs="0"/>
</sequence>
</complexType>
</element>
<element name="MessageId" type="tns:non-empty-string"/>
<element name="TimeToLive" type="dateTime"/>
<element name="DuplicateElimination">
</element>
<!-- SYNC REPLY, for use in soap:Header element -->
<element name="SyncReply">
<complexType>
<sequence>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
<attribute ref="soap:actor" use="required"/>
</complexType>
</element>
<!-- MESSAGE ORDER, for use in soap:Header element -->
<element name="MessageOrder">
<complexType>
<sequence>
<element ref="tns:SequenceNumber"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
</complexType>
</element>
<element name="SequenceNumber" type="tns:sequenceNumber.type"/>
<!-- ACK REQUESTED, for use in soap:Header element -->
<element name="AckRequested">
<complexType>
<sequence>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
<attribute ref="soap:actor"/>
<attribute name="signed" type="boolean" use="required"/>
</complexType>
</element>
<!-- ACKNOWLEDGMENT, for use in soap:Header element -->
<element name="Acknowledgment">
<complexType>
<sequence>
<element ref="tns:Timestamp"/>
<element ref="tns:RefToMessageId"/>
<element ref="tns:From" minOccurs="0"/>
<element ref="ds:Reference" minOccurs="0" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
<attribute ref="soap:actor"/>
</complexType>
</element>
<!-- ERROR LIST, for use in soap:Header element -->
<element name="ErrorList">
<complexType>
<sequence>
<element ref="tns:Error" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
<attribute name="highestSeverity" type="tns:severity.type" use="required"/>
</complexType>
</element>
<element name="Error">
<complexType>
<sequence>
<element ref="tns:Description" minOccurs="0"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute ref="tns:id"/>
<attribute name="codeContext" type="anyURI"
default="urn:oasis:names:tc:ebxml-msg:service:errors"/>
<attribute name="errorCode" type="tns:non-empty-string" use="required"/>
<attribute name="severity" type="tns:severity.type" use="required"/>
<attribute name="location" type="tns:non-empty-string"/>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
</element>
<!-- STATUS RESPONSE, for use in soap:Body element -->
<element name="StatusResponse">
<complexType>
<sequence>
<element ref="tns:RefToMessageId"/>
<element ref="tns:Timestamp" minOccurs="0"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:bodyExtension.grp"/>
<attribute name="messageStatus" type="tns:messageStatus.type" use="required"/>
</complexType>
</element>
<!-- STATUS REQUEST, for use in soap:Body element -->
<element name="StatusRequest">
<complexType>
<sequence>
<element ref="tns:RefToMessageId"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:bodyExtension.grp"/>
</complexType>
</element>
<!-- COMMON TYPES -->
<complexType name="sequenceNumber.type">
<simpleContent>
<extension base="nonNegativeInteger">
<attribute name="status" type="tns:status.type" default="Continue"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="status.type">
<restriction base="NMTOKEN">
<enumeration value="Reset"/>
<enumeration value="Continue"/>
</restriction>
</simpleType>
<simpleType name="messageStatus.type">
<restriction base="NMTOKEN">
<enumeration value="UnAuthorized"/>
<enumeration value="NotRecognized"/>
<enumeration value="Received"/>
<enumeration value="Processed"/>
<enumeration value="Forwarded"/>
</restriction>
</simpleType>
<simpleType name="non-empty-string">
<restriction base="string">
<minLength value="1"/>
</restriction>
</simpleType>
<simpleType name="severity.type">
<restriction base="NMTOKEN">
<enumeration value="Warning"/>
<enumeration value="Error"/>
</restriction>
</simpleType>
<!-- COMMON ATTRIBUTES and ATTRIBUTE GROUPS -->
<attribute name="id" type="ID"/>
<attribute name="version" type="tns:non-empty-string"/>
<attributeGroup name="headerExtension.grp">
<attribute ref="tns:id"/>
<attribute ref="tns:version" use="required"/>
<attribute ref="soap:mustUnderstand" use="required"/>
<anyAttribute namespace="##other" processContents="lax"/>
</attributeGroup>
<attributeGroup name="bodyExtension.grp">
<attribute ref="tns:id"/>
<attribute ref="tns:version" use="required"/>
<anyAttribute namespace="##other" processContents="lax"/>
</attributeGroup>
<!-- COMMON ELEMENTS -->
<element name="PartyId">
<complexType>
<simpleContent>
<extension base="tns:non-empty-string">
<attribute name="type" type="tns:non-empty-string"/>
</extension>
</simpleContent>
</complexType>
</element>
<element name="To">
<complexType>
<sequence>
<element ref="tns:PartyId" maxOccurs="unbounded"/>
<element name="Role" type="tns:non-empty-string" minOccurs="0"/>
</sequence>
</complexType>
</element>
<element name="From">
<complexType>
<sequence>
<element ref="tns:PartyId" maxOccurs="unbounded"/>
<element name="Role" type="tns:non-empty-string" minOccurs="0"/>
</sequence>
</complexType>
</element>
<element name="Description">
<complexType>
<simpleContent>
<extension base="tns:non-empty-string">
<attribute ref="xml:lang" use="required"/>
</extension>
</simpleContent>
</complexType>
</element>
<element name="RefToMessageId" type="tns:non-empty-string"/>
<element name="Timestamp" type="dateTime"/>
</schema>





<?xml version="1.0" encoding="UTF-8"?>
<!-- Some parsers may require explicit declaration of xmlns:xml="http://www.w3.org/XML/1998/namespace"
In that case, a copy of this schema augmented with the above declaration should be cached and used
for the purpose of schema validation on ebXML messages. -->
<schema targetNamespace="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
xmlns:tns="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified"
version="2.0">
<import namespace="http://www.w3.org/2000/09/xmldsig#"
schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
<import namespace="http://www.w3.org/1999/xlink"
schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/xlink.xsd"/>
<import namespace="http://schemas.xmlsoap.org/soap/envelope/"
schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"/>
<import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
<!-- MANIFEST, for use in soap:Body element -->
<element name="Manifest">
<complexType>
<sequence>
<element ref="tns:Reference" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:bodyExtension.grp"/>
</complexType>
</element>
<element name="Reference">
<complexType>
<sequence>
<element ref="tns:Schema" minOccurs="0" maxOccurs="unbounded"/>
<element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute ref="tns:id"/>
<attribute ref="xlink:type" fixed="simple"/>
<attribute ref="xlink:href" use="required"/>
<attribute ref="xlink:role"/>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
</element>
<element name="Schema">
<complexType>
<attribute name="location" type="anyURI" use="required"/>
<attribute name="version" type="tns:non-empty-string"/>
</complexType>
</element>
<!-- MESSAGEHEADER, for use in soap:Header element -->
<element name="MessageHeader">
<complexType>
<sequence>
<element ref="tns:From"/>
<element ref="tns:To"/>
<element ref="tns:CPAId"/>
<element ref="tns:ConversationId"/>
<element ref="tns:Service"/>
<element ref="tns:Action"/>
<element ref="tns:MessageData"/>
<element ref="tns:DuplicateElimination" minOccurs="0"/>
<element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
</complexType>
</element>
<element name="CPAId" type="tns:non-empty-string"/>
<element name="ConversationId" type="tns:non-empty-string"/>
<element name="Service">
<complexType>
<simpleContent>
<extension base="tns:non-empty-string">
<attribute name="type" type="tns:non-empty-string"/>
</extension>
</simpleContent>
</complexType>
</element>
<element name="Action" type="tns:non-empty-string"/>
<element name="MessageData">
<complexType>
<sequence>
<element ref="tns:MessageId"/>
<element ref="tns:Timestamp"/>
<element ref="tns:RefToMessageId" minOccurs="0"/>
<element ref="tns:TimeToLive" minOccurs="0"/>
</sequence>
</complexType>
</element>
<element name="MessageId" type="tns:non-empty-string"/>
<element name="TimeToLive" type="dateTime"/>
<element name="DuplicateElimination">
</element>
<!-- SYNC REPLY, for use in soap:Header element -->
<element name="SyncReply">
<complexType>
<sequence>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
<attribute ref="soap:actor" use="required"/>
</complexType>
</element>
<!-- MESSAGE ORDER, for use in soap:Header element -->
<element name="MessageOrder">
<complexType>
<sequence>
<element ref="tns:SequenceNumber"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
</complexType>
</element>
<element name="SequenceNumber" type="tns:sequenceNumber.type"/>
<!-- ACK REQUESTED, for use in soap:Header element -->
<element name="AckRequested">
<complexType>
<sequence>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
<attribute ref="soap:actor"/>
<attribute name="signed" type="boolean" use="required"/>
</complexType>
</element>
<!-- ACKNOWLEDGMENT, for use in soap:Header element -->
<element name="Acknowledgment">
<complexType>
<sequence>
<element ref="tns:Timestamp"/>
<element ref="tns:RefToMessageId"/>
<element ref="tns:From" minOccurs="0"/>
<element ref="ds:Reference" minOccurs="0" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
<attribute ref="soap:actor"/>
</complexType>
</element>
<!-- ERROR LIST, for use in soap:Header element -->
<element name="ErrorList">
<complexType>
<sequence>
<element ref="tns:Error" maxOccurs="unbounded"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:headerExtension.grp"/>
<attribute name="highestSeverity" type="tns:severity.type" use="required"/>
</complexType>
</element>
<element name="Error">
<complexType>
<sequence>
<element ref="tns:Description" minOccurs="0"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute ref="tns:id"/>
<attribute name="codeContext" type="anyURI"
default="urn:oasis:names:tc:ebxml-msg:service:errors"/>
<attribute name="errorCode" type="tns:non-empty-string" use="required"/>
<attribute name="severity" type="tns:severity.type" use="required"/>
<attribute name="location" type="tns:non-empty-string"/>
<anyAttribute namespace="##other" processContents="lax"/>
</complexType>
</element>
<!-- STATUS RESPONSE, for use in soap:Body element -->
<element name="StatusResponse">
<complexType>
<sequence>
<element ref="tns:RefToMessageId"/>
<element ref="tns:Timestamp" minOccurs="0"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:bodyExtension.grp"/>
<attribute name="messageStatus" type="tns:messageStatus.type" use="required"/>
</complexType>
</element>
<!-- STATUS REQUEST, for use in soap:Body element -->
<element name="StatusRequest">
<complexType>
<sequence>
<element ref="tns:RefToMessageId"/>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attributeGroup ref="tns:bodyExtension.grp"/>
</complexType>
</element>
<!-- COMMON TYPES -->
<complexType name="sequenceNumber.type">
<simpleContent>
<extension base="nonNegativeInteger">
<attribute name="status" type="tns:status.type" default="Continue"/>
</extension>
</simpleContent>
</complexType>
<simpleType name="status.type">
<restriction base="NMTOKEN">
<enumeration value="Reset"/>
<enumeration value="Continue"/>
</restriction>
</simpleType>
<simpleType name="messageStatus.type">
<restriction base="NMTOKEN">
<enumeration value="UnAuthorized"/>
<enumeration value="NotRecognized"/>
<enumeration value="Received"/>
<enumeration value="Processed"/>
<enumeration value="Forwarded"/>
</restriction>
</simpleType>
<simpleType name="non-empty-string">
<restriction base="string">
<minLength value="1"/>
</restriction>
</simpleType>
<simpleType name="severity.type">
<restriction base="NMTOKEN">
<enumeration value="Warning"/>
<enumeration value="Error"/>
</restriction>
</simpleType>
<!-- COMMON ATTRIBUTES and ATTRIBUTE GROUPS -->
<attribute name="id" type="ID"/>
<attribute name="version" type="tns:non-empty-string"/>
<attributeGroup name="headerExtension.grp">
<attribute ref="tns:id"/>
<attribute ref="tns:version" use="required"/>
<attribute ref="soap:mustUnderstand" use="required"/>
<anyAttribute namespace="##other" processContents="lax"/>
</attributeGroup>
<attributeGroup name="bodyExtension.grp">
<attribute ref="tns:id"/>
<attribute ref="tns:version" use="required"/>
<anyAttribute namespace="##other" processContents="lax"/>
</attributeGroup>
<!-- COMMON ELEMENTS -->
<element name="PartyId">
<complexType>
<simpleContent>
<extension base="tns:non-empty-string">
<attribute name="type" type="tns:non-empty-string"/>
</extension>
</simpleContent>
</complexType>
</element>
<element name="To">
<complexType>
<sequence>
<element ref="tns:PartyId" maxOccurs="unbounded"/>
<element name="Role" type="tns:non-empty-string" minOccurs="0"/>
</sequence>
</complexType>
</element>
<element name="From">
<complexType>
<sequence>
<element ref="tns:PartyId" maxOccurs="unbounded"/>
<element name="Role" type="tns:non-empty-string" minOccurs="0"/>
</sequence>
</complexType>
</element>
<element name="Description">
<complexType>
<simpleContent>
<extension base="tns:non-empty-string">
<attribute ref="xml:lang" use="required"/>
</extension>
</simpleContent>
</complexType>
</element>
<element name="RefToMessageId" type="tns:non-empty-string"/>
<element name="Timestamp" type="dateTime"/>
</schema>

Thanks again
Raj

"Christof [MVP BizTalk Server]" wrote:

> Hi Raj,
>
> It seems like you have defined some type in your XML Schema that has same
> typename as your root node. Try changing your rootnode's typename and let
> me know. This does not change any meanings within your schema or with
> regards to the validation. (The type name is only used as a matter of being
> able to refer to that type.)
>
> For your information .NET builds upon the MSXML 3 bits as far as I know.
>
> What do you mean with: "Why cant I have my message type as the entire
> schema" please?
> Your schema may define several XML types. BizTalk Server cannot know witch
> of those to apply as the type of your message. You'll have to specify this.
>
> Regarding your third concern: please provide me with more detail. Which
> constructs are not supported? I'm not sure which parser is being used. I'm
> highly interested if you have a repro. (Preferrable without too many
> imports/referals to other schemas.)
>
> So far my first posting as a BizTalk Server MVP :-)))
>
> Best regards!
> Christof [Microsoft BizTalk Server MVP]
>
> "Raj" <Raj@discussions.microsoft.com> wrote in message
> news:B2B69BB0-1EDF-4C71-B0A6-E3E3736C37D4@microsoft.com...
> right solution
> and all these schemas refer external schemas which are
> following error
> of its root nodes. Make sure that they are different"
> works fine within MSXML.
> you are interested(Iam using MSXML4.0 SP2)
> an assembly out of it and place it in GAC
> pointing to one of the schemas as the message type, it doesnt allow me to
> select the entire schema rather it allows me to use one of the types under
> it!
> class?Because for some schemas Iam able to validate the XML/XSD using
> XmlValidatingReader but not thro' Biztalk!
> appreciate it
> pane.
> biztalk
> no
> project, it
> the
> that
> you
> (as
> supported.
> and
> though
> Spy
> without
>
>
>

Raj

2004-07-09, 3:32 pm

Oops..I posted the schema twice
Also,here is the code Iam using for validating XML using XMLValidator.

XMLValidator.cs:-

using System;
using System.Collections;
using System.Data;
using System.IO;
using System.Xml;
using System.Xml.Schema;
using System.Text;
public class XMLValidator
{
static int ErrorsCount = 0;
static string ErrorMessage = "";
public static void ValidationHandler(object sender,
ValidationEventArgs args)
{
ErrorMessage = ErrorMessage + args.Message + "\r\n";
ErrorsCount ++;
}
public void Validate(string xmlFileName, string schemaFileName)
{
try
{
XmlTextReader tr = null;
XmlSchemaCollection xsc = null;
XmlValidatingReader vr = null;
tr = new XmlTextReader(schemaFileName);
xsc = new XmlSchemaCollection();
xsc.Add(null, tr);
Console.WriteLine("Schema Collection : " + xsc.ToString());
tr = new XmlTextReader(xmlFileName);
vr = new XmlValidatingReader(tr);
vr.Schemas.Add(xsc);
vr.ValidationType = ValidationType.Schema;
vr.ValidationEventHandler +=
new ValidationEventHandler(ValidationHandler
);
while(vr.Read());
vr.Close();
if (ErrorsCount > 0)
{
throw new Exception(ErrorMessage);
}
Console.WriteLine("XML validation succeeded.\r\n");
}
catch(Exception error)
{
Console.WriteLine("XML validation failed." + "\r\n" +
"Error Message: " + error.Message);
}
}
}

"Raj" wrote:

> Chris,
> Congrats on ur MVP and thanks again for answering my questions.
>
> 1. I agree with you that if I change the rootnode's typename,it allows me to validate but the schemas are from a standard body(STAR/OAGIS) and Iam not supposed to edit anything w.r.to schema except for referencing them to validate.
>
> 2. Even, if Iam able to validate the schema and define a message type by referencing the schema within the project, for some reason Iam getting a runtime parse errror when i send a sample message (which is nothing but an output of the "generate instance

" option).[vbcol=seagreen]
>
> 3. I have attached the sample schema below (275 lines) which gets validates when I use XMLValidator or VS.net2003-->File-->Open-->File & then Schema-->Validate Schema.
> But when I add the schema as part of the Biztalk project and then try to validate the schema, no good and complains that all the
> "www.w3.org" reference does not exist in the current project.
>
> Sample schema:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- Some parsers may require explicit declaration of xmlns:xml="http://www.w3.org/XML/1998/namespace"
> In that case, a copy of this schema augmented with the above declaration should be cached and used
> for the purpose of schema validation on ebXML messages. -->
> <schema targetNamespace="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
> xmlns:tns="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
> xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="qualified"
> version="2.0">
> <import namespace="http://www.w3.org/2000/09/xmldsig#"
> schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
> <import namespace="http://www.w3.org/1999/xlink"
> schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/xlink.xsd"/>
> <import namespace="http://schemas.xmlsoap.org/soap/envelope/"
> schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"/>
> <import namespace="http://www.w3.org/XML/1998/namespace"
> schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
> <!-- MANIFEST, for use in soap:Body element -->
> <element name="Manifest">
> <complexType>
> <sequence>
> <element ref="tns:Reference" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> </complexType>
> </element>
> <element name="Reference">
> <complexType>
> <sequence>
> <element ref="tns:Schema" minOccurs="0" maxOccurs="unbounded"/>
> <element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attribute ref="tns:id"/>
> <attribute ref="xlink:type" fixed="simple"/>
> <attribute ref="xlink:href" use="required"/>
> <attribute ref="xlink:role"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </complexType>
> </element>
> <element name="Schema">
> <complexType>
> <attribute name="location" type="anyURI" use="required"/>
> <attribute name="version" type="tns:non-empty-string"/>
> </complexType>
> </element>
> <!-- MESSAGEHEADER, for use in soap:Header element -->
> <element name="MessageHeader">
> <complexType>
> <sequence>
> <element ref="tns:From"/>
> <element ref="tns:To"/>
> <element ref="tns:CPAId"/>
> <element ref="tns:ConversationId"/>
> <element ref="tns:Service"/>
> <element ref="tns:Action"/>
> <element ref="tns:MessageData"/>
> <element ref="tns:DuplicateElimination" minOccurs="0"/>
> <element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> </complexType>
> </element>
> <element name="CPAId" type="tns:non-empty-string"/>
> <element name="ConversationId" type="tns:non-empty-string"/>
> <element name="Service">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute name="type" type="tns:non-empty-string"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="Action" type="tns:non-empty-string"/>
> <element name="MessageData">
> <complexType>
> <sequence>
> <element ref="tns:MessageId"/>
> <element ref="tns:Timestamp"/>
> <element ref="tns:RefToMessageId" minOccurs="0"/>
> <element ref="tns:TimeToLive" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="MessageId" type="tns:non-empty-string"/>
> <element name="TimeToLive" type="dateTime"/>
> <element name="DuplicateElimination">
> </element>
> <!-- SYNC REPLY, for use in soap:Header element -->
> <element name="SyncReply">
> <complexType>
> <sequence>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor" use="required"/>
> </complexType>
> </element>
> <!-- MESSAGE ORDER, for use in soap:Header element -->
> <element name="MessageOrder">
> <complexType>
> <sequence>
> <element ref="tns:SequenceNumber"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> </complexType>
> </element>
> <element name="SequenceNumber" type="tns:sequenceNumber.type"/>
> <!-- ACK REQUESTED, for use in soap:Header element -->
> <element name="AckRequested">
> <complexType>
> <sequence>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor"/>
> <attribute name="signed" type="boolean" use="required"/>
> </complexType>
> </element>
> <!-- ACKNOWLEDGMENT, for use in soap:Header element -->
> <element name="Acknowledgment">
> <complexType>
> <sequence>
> <element ref="tns:Timestamp"/>
> <element ref="tns:RefToMessageId"/>
> <element ref="tns:From" minOccurs="0"/>
> <element ref="ds:Reference" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor"/>
> </complexType>
> </element>
> <!-- ERROR LIST, for use in soap:Header element -->
> <element name="ErrorList">
> <complexType>
> <sequence>
> <element ref="tns:Error" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute name="highestSeverity" type="tns:severity.type" use="required"/>
> </complexType>
> </element>
> <element name="Error">
> <complexType>
> <sequence>
> <element ref="tns:Description" minOccurs="0"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attribute ref="tns:id"/>
> <attribute name="codeContext" type="anyURI"
> default="urn:oasis:names:tc:ebxml-msg:service:errors"/>
> <attribute name="errorCode" type="tns:non-empty-string" use="required"/>
> <attribute name="severity" type="tns:severity.type" use="required"/>
> <attribute name="location" type="tns:non-empty-string"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </complexType>
> </element>
> <!-- STATUS RESPONSE, for use in soap:Body element -->
> <element name="StatusResponse">
> <complexType>
> <sequence>
> <element ref="tns:RefToMessageId"/>
> <element ref="tns:Timestamp" minOccurs="0"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> <attribute name="messageStatus" type="tns:messageStatus.type" use="required"/>
> </complexType>
> </element>
> <!-- STATUS REQUEST, for use in soap:Body element -->
> <element name="StatusRequest">
> <complexType>
> <sequence>
> <element ref="tns:RefToMessageId"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> </complexType>
> </element>
> <!-- COMMON TYPES -->
> <complexType name="sequenceNumber.type">
> <simpleContent>
> <extension base="nonNegativeInteger">
> <attribute name="status" type="tns:status.type" default="Continue"/>
> </extension>
> </simpleContent>
> </complexType>
> <simpleType name="status.type">
> <restriction base="NMTOKEN">
> <enumeration value="Reset"/>
> <enumeration value="Continue"/>
> </restriction>
> </simpleType>
> <simpleType name="messageStatus.type">
> <restriction base="NMTOKEN">
> <enumeration value="UnAuthorized"/>
> <enumeration value="NotRecognized"/>
> <enumeration value="Received"/>
> <enumeration value="Processed"/>
> <enumeration value="Forwarded"/>
> </restriction>
> </simpleType>
> <simpleType name="non-empty-string">
> <restriction base="string">
> <minLength value="1"/>
> </restriction>
> </simpleType>
> <simpleType name="severity.type">
> <restriction base="NMTOKEN">
> <enumeration value="Warning"/>
> <enumeration value="Error"/>
> </restriction>
> </simpleType>
> <!-- COMMON ATTRIBUTES and ATTRIBUTE GROUPS -->
> <attribute name="id" type="ID"/>
> <attribute name="version" type="tns:non-empty-string"/>
> <attributeGroup name="headerExtension.grp">
> <attribute ref="tns:id"/>
> <attribute ref="tns:version" use="required"/>
> <attribute ref="soap:mustUnderstand" use="required"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </attributeGroup>
> <attributeGroup name="bodyExtension.grp">
> <attribute ref="tns:id"/>
> <attribute ref="tns:version" use="required"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </attributeGroup>
> <!-- COMMON ELEMENTS -->
> <element name="PartyId">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute name="type" type="tns:non-empty-string"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="To">
> <complexType>
> <sequence>
> <element ref="tns:PartyId" maxOccurs="unbounded"/>
> <element name="Role" type="tns:non-empty-string" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="From">
> <complexType>
> <sequence>
> <element ref="tns:PartyId" maxOccurs="unbounded"/>
> <element name="Role" type="tns:non-empty-string" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="Description">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute ref="xml:lang" use="required"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="RefToMessageId" type="tns:non-empty-string"/>
> <element name="Timestamp" type="dateTime"/>
> </schema>
>
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- Some parsers may require explicit declaration of xmlns:xml="http://www.w3.org/XML/1998/namespace"
> In that case, a copy of this schema augmented with the above declaration should be cached and used
> for the purpose of schema validation on ebXML messages. -->
> <schema targetNamespace="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
> xmlns:tns="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd"
> xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="qualified"
> version="2.0">
> <import namespace="http://www.w3.org/2000/09/xmldsig#"
> schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
> <import namespace="http://www.w3.org/1999/xlink"
> schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/xlink.xsd"/>
> <import namespace="http://schemas.xmlsoap.org/soap/envelope/"
> schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/envelope.xsd"/>
> <import namespace="http://www.w3.org/XML/1998/namespace"
> schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
> <!-- MANIFEST, for use in soap:Body element -->
> <element name="Manifest">
> <complexType>
> <sequence>
> <element ref="tns:Reference" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> </complexType>
> </element>
> <element name="Reference">
> <complexType>
> <sequence>
> <element ref="tns:Schema" minOccurs="0" maxOccurs="unbounded"/>
> <element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attribute ref="tns:id"/>
> <attribute ref="xlink:type" fixed="simple"/>
> <attribute ref="xlink:href" use="required"/>
> <attribute ref="xlink:role"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </complexType>
> </element>
> <element name="Schema">
> <complexType>
> <attribute name="location" type="anyURI" use="required"/>
> <attribute name="version" type="tns:non-empty-string"/>
> </complexType>
> </element>
> <!-- MESSAGEHEADER, for use in soap:Header element -->
> <element name="MessageHeader">
> <complexType>
> <sequence>
> <element ref="tns:From"/>
> <element ref="tns:To"/>
> <element ref="tns:CPAId"/>
> <element ref="tns:ConversationId"/>
> <element ref="tns:Service"/>
> <element ref="tns:Action"/>
> <element ref="tns:MessageData"/>
> <element ref="tns:DuplicateElimination" minOccurs="0"/>
> <element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> </complexType>
> </element>
> <element name="CPAId" type="tns:non-empty-string"/>
> <element name="ConversationId" type="tns:non-empty-string"/>
> <element name="Service">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute name="type" type="tns:non-empty-string"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="Action" type="tns:non-empty-string"/>
> <element name="MessageData">
> <complexType>
> <sequence>
> <element ref="tns:MessageId"/>
> <element ref="tns:Timestamp"/>
> <element ref="tns:RefToMessageId" minOccurs="0"/>
> <element ref="tns:TimeToLive" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="MessageId" type="tns:non-empty-string"/>
> <element name="TimeToLive" type="dateTime"/>
> <element name="DuplicateElimination">
> </element>
> <!-- SYNC REPLY, for use in soap:Header element -->
> <element name="SyncReply">
> <complexType>
> <sequence>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor" use="required"/>
> </complexType>
> </element>
> <!-- MESSAGE ORDER, for use in soap:Header element -->
> <element name="MessageOrder">
> <complexType>
> <sequence>
> <element ref="tns:SequenceNumber"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> </complexType>
> </element>
> <element name="SequenceNumber" type="tns:sequenceNumber.type"/>
> <!-- ACK REQUESTED, for use in soap:Header element -->
> <element name="AckRequested">
> <complexType>
> <sequence>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor"/>
> <attribute name="signed" type="boolean" use="required"/>
> </complexType>
> </element>
> <!-- ACKNOWLEDGMENT, for use in soap:Header element -->
> <element name="Acknowledgment">
> <complexType>
> <sequence>
> <element ref="tns:Timestamp"/>
> <element ref="tns:RefToMessageId"/>
> <element ref="tns:From" minOccurs="0"/>
> <element ref="ds:Reference" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor"/>
> </complexType>
> </element>
> <!-- ERROR LIST, for use in soap:Header element -->
> <element name="ErrorList">
> <complexType>
> <sequence>
> <element ref="tns:Error" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute name="highestSeverity" type="tns:severity.type" use="required"/>
> </complexType>
> </element>
> <element name="Error">
> <complexType>
> <sequence>
> <element ref="tns:Description" minOccurs="0"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attribute ref="tns:id"/>
> <attribute name="codeContext" type="anyURI"
> default="urn:oasis:names:tc:ebxml-msg:service:errors"/>
> <attribute name="errorCode" type="tns:non-empty-string" use="required"/>
> <attribute name="severity" type="tns:severity.type" use="required"/>
> <attribute name="location" type="tns:non-empty-string"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </complexType>
> </element>
> <!-- STATUS RESPONSE, for use in soap:Body element -->
> <element name="StatusResponse">
> <complexType>
> <sequence>
> <element ref="tns:RefToMessageId"/>
> <element ref="tns:Timestamp" minOccurs="0"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> <attribute name="messageStatus" type="tns:messageStatus.type" use="required"/>
> </complexType>
> </element>
> <!-- STATUS REQUEST, for use in soap:Body element -->
> <element name="StatusRequest">
> <complexType>
> <sequence>
> <element ref="tns:RefToMessageId"/>
> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> </complexType>
> </element>
> <!-- COMMON TYPES -->
> <complexType name="sequenceNumber.type">
> <simpleContent>
> <extension base="nonNegativeInteger">
> <attribute name="status" type="tns:status.type" default="Continue"/>
> </extension>
> </simpleContent>
> </complexType>
> <simpleType name="status.type">
> <restriction base="NMTOKEN">
> <enumeration value="Reset"/>
> <enumeration value="Continue"/>
> </restriction>
> </simpleType>
> <simpleType name="messageStatus.type">
> <restriction base="NMTOKEN">
> <enumeration value="UnAuthorized"/>
> <enumeration value="NotRecognized"/>
> <enumeration value="Received"/>
> <enumeration value="Processed"/>
> <enumeration value="Forwarded"/>
> </restriction>
> </simpleType>
> <simpleType name="non-empty-string">
> <restriction base="string">
> <minLength value="1"/>
> </restriction>
> </simpleType>
> <simpleType name="severity.type">
> <restriction base="NMTOKEN">
> <enumeration value="Warning"/>
> <enumeration value="Error"/>
> </restriction>
> </simpleType>
> <!-- COMMON ATTRIBUTES and ATTRIBUTE GROUPS -->
> <attribute name="id" type="ID"/>
> <attribute name="version" type="tns:non-empty-string"/>
> <attributeGroup name="headerExtension.grp">
> <attribute ref="tns:id"/>
> <attribute ref="tns:version" use="required"/>
> <attribute ref="soap:mustUnderstand" use="required"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </attributeGroup>
> <attributeGroup name="bodyExtension.grp">
> <attribute ref="tns:id"/>
> <attribute ref="tns:version" use="required"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </attributeGroup>
> <!-- COMMON ELEMENTS -->
> <element name="PartyId">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute name="type" type="tns:non-empty-string"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="To">
> <complexType>
> <sequence>
> <element ref="tns:PartyId" maxOccurs="unbounded"/>
> <element name="Role" type="tns:non-empty-string" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="From">
> <complexType>
> <sequence>
> <element ref="tns:PartyId" maxOccurs="unbounded"/>
> <element name="Role" type="tns:non-empty-string" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="Description">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute ref="xml:lang" use="required"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="RefToMessageId" type="tns:non-empty-string"/>
> <element name="Timestamp" type="dateTime"/>
> </schema>
>
> Thanks again
> Raj
>
> "Christof [MVP BizTalk Server]" wrote:
>
Christof [MVP]

2004-07-09, 3:32 pm

Hi Raj,

have you deployed all schemas that are imported by your standards body
schema please? In addition you need to reference them both in your project
as well as in the schema itself.

Hope this helps,
Best regards,

Christof


"Raj" <Raj@discussions.microsoft.com> wrote in message
news:D4407019-0360-4397-B877-812760E8ECE3@microsoft.com...
> Chris,
> Congrats on ur MVP and thanks again for answering my questions.
>
> 1. I agree with you that if I change the rootnode's typename,it allows me

to validate but the schemas are from a standard body(STAR/OAGIS) and Iam not
supposed to edit anything w.r.to schema except for referencing them to
validate.
>
> 2. Even, if Iam able to validate the schema and define a message type by

referencing the schema within the project, for some reason Iam getting a
runtime parse errror when i send a sample message (which is nothing but an
output of the "generate instance" option).
>
> 3. I have attached the sample schema below (275 lines) which gets

validates when I use XMLValidator or VS.net2003-->File-->Open-->File & then
Schema-->Validate Schema.
> But when I add the schema as part of the Biztalk project and then try to

validate the schema, no good and complains that all the
> "www.w3.org" reference does not exist in the current project.
>
> Sample schema:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- Some parsers may require explicit declaration of

xmlns:xml="http://www.w3.org/XML/1998/namespace"
> In that case, a copy of this schema augmented with the above declaration

should be cached and used
> for the purpose of schema validation on ebXML messages. -->
> <schema

targetNamespace="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-h
eader-2_0.xsd"
>

xmlns:tns="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-
2_0.xsd"
> xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="qualified"
> version="2.0">
> <import namespace="http://www.w3.org/2000/09/xmldsig#"
>

schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
> <import namespace="http://www.w3.org/1999/xlink"
>

schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/xlink.
xsd"/>
> <import namespace="http://schemas.xmlsoap.org/soap/envelope/"
>

schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/envelo
pe.xsd"/>
> <import namespace="http://www.w3.org/XML/1998/namespace"
> schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
> <!-- MANIFEST, for use in soap:Body element -->
> <element name="Manifest">
> <complexType>
> <sequence>
> <element ref="tns:Reference" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> </complexType>
> </element>
> <element name="Reference">
> <complexType>
> <sequence>
> <element ref="tns:Schema" minOccurs="0" maxOccurs="unbounded"/>
> <element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attribute ref="tns:id"/>
> <attribute ref="xlink:type" fixed="simple"/>
> <attribute ref="xlink:href" use="required"/>
> <attribute ref="xlink:role"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </complexType>
> </element>
> <element name="Schema">
> <complexType>
> <attribute name="location" type="anyURI" use="required"/>
> <attribute name="version" type="tns:non-empty-string"/>
> </complexType>
> </element>
> <!-- MESSAGEHEADER, for use in soap:Header element -->
> <element name="MessageHeader">
> <complexType>
> <sequence>
> <element ref="tns:From"/>
> <element ref="tns:To"/>
> <element ref="tns:CPAId"/>
> <element ref="tns:ConversationId"/>
> <element ref="tns:Service"/>
> <element ref="tns:Action"/>
> <element ref="tns:MessageData"/>
> <element ref="tns:DuplicateElimination" minOccurs="0"/>
> <element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> </complexType>
> </element>
> <element name="CPAId" type="tns:non-empty-string"/>
> <element name="ConversationId" type="tns:non-empty-string"/>
> <element name="Service">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute name="type" type="tns:non-empty-string"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="Action" type="tns:non-empty-string"/>
> <element name="MessageData">
> <complexType>
> <sequence>
> <element ref="tns:MessageId"/>
> <element ref="tns:Timestamp"/>
> <element ref="tns:RefToMessageId" minOccurs="0"/>
> <element ref="tns:TimeToLive" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="MessageId" type="tns:non-empty-string"/>
> <element name="TimeToLive" type="dateTime"/>
> <element name="DuplicateElimination">
> </element>
> <!-- SYNC REPLY, for use in soap:Header element -->
> <element name="SyncReply">
> <complexType>
> <sequence>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor" use="required"/>
> </complexType>
> </element>
> <!-- MESSAGE ORDER, for use in soap:Header element -->
> <element name="MessageOrder">
> <complexType>
> <sequence>
> <element ref="tns:SequenceNumber"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> </complexType>
> </element>
> <element name="SequenceNumber" type="tns:sequenceNumber.type"/>
> <!-- ACK REQUESTED, for use in soap:Header element -->
> <element name="AckRequested">
> <complexType>
> <sequence>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor"/>
> <attribute name="signed" type="boolean" use="required"/>
> </complexType>
> </element>
> <!-- ACKNOWLEDGMENT, for use in soap:Header element -->
> <element name="Acknowledgment">
> <complexType>
> <sequence>
> <element ref="tns:Timestamp"/>
> <element ref="tns:RefToMessageId"/>
> <element ref="tns:From" minOccurs="0"/>
> <element ref="ds:Reference" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor"/>
> </complexType>
> </element>
> <!-- ERROR LIST, for use in soap:Header element -->
> <element name="ErrorList">
> <complexType>
> <sequence>
> <element ref="tns:Error" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute name="highestSeverity" type="tns:severity.type"

use="required"/>
> </complexType>
> </element>
> <element name="Error">
> <complexType>
> <sequence>
> <element ref="tns:Description" minOccurs="0"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attribute ref="tns:id"/>
> <attribute name="codeContext" type="anyURI"
> default="urn:oasis:names:tc:ebxml-msg:service:errors"/>
> <attribute name="errorCode" type="tns:non-empty-string" use="required"/>
> <attribute name="severity" type="tns:severity.type" use="required"/>
> <attribute name="location" type="tns:non-empty-string"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </complexType>
> </element>
> <!-- STATUS RESPONSE, for use in soap:Body element -->
> <element name="StatusResponse">
> <complexType>
> <sequence>
> <element ref="tns:RefToMessageId"/>
> <element ref="tns:Timestamp" minOccurs="0"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> <attribute name="messageStatus" type="tns:messageStatus.type"

use="required"/>
> </complexType>
> </element>
> <!-- STATUS REQUEST, for use in soap:Body element -->
> <element name="StatusRequest">
> <complexType>
> <sequence>
> <element ref="tns:RefToMessageId"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> </complexType>
> </element>
> <!-- COMMON TYPES -->
> <complexType name="sequenceNumber.type">
> <simpleContent>
> <extension base="nonNegativeInteger">
> <attribute name="status" type="tns:status.type" default="Continue"/>
> </extension>
> </simpleContent>
> </complexType>
> <simpleType name="status.type">
> <restriction base="NMTOKEN">
> <enumeration value="Reset"/>
> <enumeration value="Continue"/>
> </restriction>
> </simpleType>
> <simpleType name="messageStatus.type">
> <restriction base="NMTOKEN">
> <enumeration value="UnAuthorized"/>
> <enumeration value="NotRecognized"/>
> <enumeration value="Received"/>
> <enumeration value="Processed"/>
> <enumeration value="Forwarded"/>
> </restriction>
> </simpleType>
> <simpleType name="non-empty-string">
> <restriction base="string">
> <minLength value="1"/>
> </restriction>
> </simpleType>
> <simpleType name="severity.type">
> <restriction base="NMTOKEN">
> <enumeration value="Warning"/>
> <enumeration value="Error"/>
> </restriction>
> </simpleType>
> <!-- COMMON ATTRIBUTES and ATTRIBUTE GROUPS -->
> <attribute name="id" type="ID"/>
> <attribute name="version" type="tns:non-empty-string"/>
> <attributeGroup name="headerExtension.grp">
> <attribute ref="tns:id"/>
> <attribute ref="tns:version" use="required"/>
> <attribute ref="soap:mustUnderstand" use="required"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </attributeGroup>
> <attributeGroup name="bodyExtension.grp">
> <attribute ref="tns:id"/>
> <attribute ref="tns:version" use="required"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </attributeGroup>
> <!-- COMMON ELEMENTS -->
> <element name="PartyId">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute name="type" type="tns:non-empty-string"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="To">
> <complexType>
> <sequence>
> <element ref="tns:PartyId" maxOccurs="unbounded"/>
> <element name="Role" type="tns:non-empty-string" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="From">
> <complexType>
> <sequence>
> <element ref="tns:PartyId" maxOccurs="unbounded"/>
> <element name="Role" type="tns:non-empty-string" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="Description">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute ref="xml:lang" use="required"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="RefToMessageId" type="tns:non-empty-string"/>
> <element name="Timestamp" type="dateTime"/>
> </schema>
>
>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- Some parsers may require explicit declaration of

xmlns:xml="http://www.w3.org/XML/1998/namespace"
> In that case, a copy of this schema augmented with the above declaration

should be cached and used
> for the purpose of schema validation on ebXML messages. -->
> <schema

targetNamespace="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-h
eader-2_0.xsd"
>

xmlns:tns="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-
2_0.xsd"
> xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="qualified"
> version="2.0">
> <import namespace="http://www.w3.org/2000/09/xmldsig#"
>

schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
> <import namespace="http://www.w3.org/1999/xlink"
>

schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/xlink.
xsd"/>
> <import namespace="http://schemas.xmlsoap.org/soap/envelope/"
>

schemaLocation="http://www.oasis-open.org/committees/ebxml-msg/schema/envelo
pe.xsd"/>
> <import namespace="http://www.w3.org/XML/1998/namespace"
> schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
> <!-- MANIFEST, for use in soap:Body element -->
> <element name="Manifest">
> <complexType>
> <sequence>
> <element ref="tns:Reference" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> </complexType>
> </element>
> <element name="Reference">
> <complexType>
> <sequence>
> <element ref="tns:Schema" minOccurs="0" maxOccurs="unbounded"/>
> <element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attribute ref="tns:id"/>
> <attribute ref="xlink:type" fixed="simple"/>
> <attribute ref="xlink:href" use="required"/>
> <attribute ref="xlink:role"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </complexType>
> </element>
> <element name="Schema">
> <complexType>
> <attribute name="location" type="anyURI" use="required"/>
> <attribute name="version" type="tns:non-empty-string"/>
> </complexType>
> </element>
> <!-- MESSAGEHEADER, for use in soap:Header element -->
> <element name="MessageHeader">
> <complexType>
> <sequence>
> <element ref="tns:From"/>
> <element ref="tns:To"/>
> <element ref="tns:CPAId"/>
> <element ref="tns:ConversationId"/>
> <element ref="tns:Service"/>
> <element ref="tns:Action"/>
> <element ref="tns:MessageData"/>
> <element ref="tns:DuplicateElimination" minOccurs="0"/>
> <element ref="tns:Description" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> </complexType>
> </element>
> <element name="CPAId" type="tns:non-empty-string"/>
> <element name="ConversationId" type="tns:non-empty-string"/>
> <element name="Service">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute name="type" type="tns:non-empty-string"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="Action" type="tns:non-empty-string"/>
> <element name="MessageData">
> <complexType>
> <sequence>
> <element ref="tns:MessageId"/>
> <element ref="tns:Timestamp"/>
> <element ref="tns:RefToMessageId" minOccurs="0"/>
> <element ref="tns:TimeToLive" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="MessageId" type="tns:non-empty-string"/>
> <element name="TimeToLive" type="dateTime"/>
> <element name="DuplicateElimination">
> </element>
> <!-- SYNC REPLY, for use in soap:Header element -->
> <element name="SyncReply">
> <complexType>
> <sequence>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor" use="required"/>
> </complexType>
> </element>
> <!-- MESSAGE ORDER, for use in soap:Header element -->
> <element name="MessageOrder">
> <complexType>
> <sequence>
> <element ref="tns:SequenceNumber"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> </complexType>
> </element>
> <element name="SequenceNumber" type="tns:sequenceNumber.type"/>
> <!-- ACK REQUESTED, for use in soap:Header element -->
> <element name="AckRequested">
> <complexType>
> <sequence>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor"/>
> <attribute name="signed" type="boolean" use="required"/>
> </complexType>
> </element>
> <!-- ACKNOWLEDGMENT, for use in soap:Header element -->
> <element name="Acknowledgment">
> <complexType>
> <sequence>
> <element ref="tns:Timestamp"/>
> <element ref="tns:RefToMessageId"/>
> <element ref="tns:From" minOccurs="0"/>
> <element ref="ds:Reference" minOccurs="0" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute ref="soap:actor"/>
> </complexType>
> </element>
> <!-- ERROR LIST, for use in soap:Header element -->
> <element name="ErrorList">
> <complexType>
> <sequence>
> <element ref="tns:Error" maxOccurs="unbounded"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:headerExtension.grp"/>
> <attribute name="highestSeverity" type="tns:severity.type"

use="required"/>
> </complexType>
> </element>
> <element name="Error">
> <complexType>
> <sequence>
> <element ref="tns:Description" minOccurs="0"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attribute ref="tns:id"/>
> <attribute name="codeContext" type="anyURI"
> default="urn:oasis:names:tc:ebxml-msg:service:errors"/>
> <attribute name="errorCode" type="tns:non-empty-string" use="required"/>
> <attribute name="severity" type="tns:severity.type" use="required"/>
> <attribute name="location" type="tns:non-empty-string"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </complexType>
> </element>
> <!-- STATUS RESPONSE, for use in soap:Body element -->
> <element name="StatusResponse">
> <complexType>
> <sequence>
> <element ref="tns:RefToMessageId"/>
> <element ref="tns:Timestamp" minOccurs="0"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> <attribute name="messageStatus" type="tns:messageStatus.type"

use="required"/>
> </complexType>
> </element>
> <!-- STATUS REQUEST, for use in soap:Body element -->
> <element name="StatusRequest">
> <complexType>
> <sequence>
> <element ref="tns:RefToMessageId"/>
> <any namespace="##other" processContents="lax" minOccurs="0"

maxOccurs="unbounded"/>[vbcol=seagreen]
> </sequence>
> <attributeGroup ref="tns:bodyExtension.grp"/>
> </complexType>
> </element>
> <!-- COMMON TYPES -->
> <complexType name="sequenceNumber.type">
> <simpleContent>
> <extension base="nonNegativeInteger">
> <attribute name="status" type="tns:status.type" default="Continue"/>
> </extension>
> </simpleContent>
> </complexType>
> <simpleType name="status.type">
> <restriction base="NMTOKEN">
> <enumeration value="Reset"/>
> <enumeration value="Continue"/>
> </restriction>
> </simpleType>
> <simpleType name="messageStatus.type">
> <restriction base="NMTOKEN">
> <enumeration value="UnAuthorized"/>
> <enumeration value="NotRecognized"/>
> <enumeration value="Received"/>
> <enumeration value="Processed"/>
> <enumeration value="Forwarded"/>
> </restriction>
> </simpleType>
> <simpleType name="non-empty-string">
> <restriction base="string">
> <minLength value="1"/>
> </restriction>
> </simpleType>
> <simpleType name="severity.type">
> <restriction base="NMTOKEN">
> <enumeration value="Warning"/>
> <enumeration value="Error"/>
> </restriction>
> </simpleType>
> <!-- COMMON ATTRIBUTES and ATTRIBUTE GROUPS -->
> <attribute name="id" type="ID"/>
> <attribute name="version" type="tns:non-empty-string"/>
> <attributeGroup name="headerExtension.grp">
> <attribute ref="tns:id"/>
> <attribute ref="tns:version" use="required"/>
> <attribute ref="soap:mustUnderstand" use="required"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </attributeGroup>
> <attributeGroup name="bodyExtension.grp">
> <attribute ref="tns:id"/>
> <attribute ref="tns:version" use="required"/>
> <anyAttribute namespace="##other" processContents="lax"/>
> </attributeGroup>
> <!-- COMMON ELEMENTS -->
> <element name="PartyId">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute name="type" type="tns:non-empty-string"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="To">
> <complexType>
> <sequence>
> <element ref="tns:PartyId" maxOccurs="unbounded"/>
> <element name="Role" type="tns:non-empty-string" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="From">
> <complexType>
> <sequence>
> <element ref="tns:PartyId" maxOccurs="unbounded"/>
> <element name="Role" type="tns:non-empty-string" minOccurs="0"/>
> </sequence>
> </complexType>
> </element>
> <element name="Description">
> <complexType>
> <simpleContent>
> <extension base="tns:non-empty-string">
> <attribute ref="xml:lang" use="required"/>
> </extension>
> </simpleContent>
> </complexType>
> </element>
> <element name="RefToMessageId" type="tns:non-empty-string"/>
> <element name="Timestamp" type="dateTime"/>
> </schema>
>
> Thanks again
> Raj
>
> "Christof [MVP BizTalk Server]" wrote:
>
same[vbcol=seagreen]
let[vbcol=seagreen]
being[vbcol=seagreen]
witch[vbcol=seagreen]
this.[vbcol=seagreen]
I'm[vbcol=seagreen]
the[vbcol=seagreen]
project[vbcol=seagreen]
the[vbcol=seagreen]
one[vbcol=seagreen]
it[vbcol=seagreen]
schemas if[vbcol=seagreen]
generate[vbcol=seagreen]
to[vbcol=seagreen]
under[vbcol=seagreen]
really[vbcol=seagreen]
Use[vbcol=seagreen]
the[vbcol=seagreen]
refer to[vbcol=seagreen]
project[vbcol=seagreen]
and[vbcol=seagreen]
still[vbcol=seagreen]
(not[vbcol=seagreen]
tell[vbcol=seagreen]
schemas[vbcol=seagreen]
schemas[vbcol=seagreen]
XML[vbcol=seagreen]


Raj

2004-07-09, 3:32 pm

Christof,
Ok,I see!Now, I have imported all the schemas imported by my std schemas.For example, the below schema I used in my earlier message references the following
1. envelope.xsd,
2. xlink.xsd,
3. xml.xsd,
4. xmldsig-core-schema.xsd
I included them all as part of my Biztalk project and validated them successfully.When i try to validate the main schema , it ends up throwing error BEC2012: Node "Schema" - Specify a valid .NET type name for this root node. The current .NET type name of
this root node is invalid
So, I went ahead and changed the Typename in the properties to say "ebXMLMessage" but still it throws the same error message.Irrespective of what name i use, it still throws the same error message.Seems like Iam really missing some piece here!
Thanks again for your response.I do really appreciate it
Raj
Raj

2004-07-09, 3:32 pm

Chris,
Ok, I found the reason for the BEC2012 error..Its because the ebXML message schema has the element schema defined in the schema as below

<element name="Schema">
<complexType>
<attribute name="location" type="anyURI" use="required" />
<attribute name="version" type="tns:non-empty-string" />
</complexType>
</element>

and if I change the "Schema" to something else, the error doesnt come.
But this schema is from a ebXML.org and I dont have any control over it..Is there someway I can go around within Biztalk without editing the schema element name?
Thanks again
Raj

"Raj" wrote:

> Christof,
> Ok,I see!Now, I have imported all the schemas imported by my std schemas.For example, the below schema I used in my earlier message references the following
> 1. envelope.xsd,
> 2. xlink.xsd,
> 3. xml.xsd,
> 4. xmldsig-core-schema.xsd
> I included them all as part of my Biztalk project and validated them successfully.When i try to validate the main schema , it ends up throwing error BEC2012: Node "Schema" - Specify a valid .NET type name for this root node. The current .NET type name

of this root node is invalid
> So, I went ahead and changed the Typename in the properties to say "ebXMLMessage" but still it throws the same error message.Irrespective of what name i use, it still throws the same error message.Seems like Iam really missing some piece here!
> Thanks again for your response.I do really appreciate it
> Raj

Christof [MVP]

2004-07-09, 3:32 pm

To what namespace is the Schema node targetted please? I guess, this should
be supported... If they don't, you might raise an issue for PSS.

Best regards,
Christof

--
Christof [Microsoft BizTalk Server MVP]


"Raj" <Raj@discussions.microsoft.com> wrote in message
news:51CC5B30-5977-4D3F-B00E-526373C60B4D@microsoft.com...
> Chris,
> Ok, I found the reason for the BEC2012 error..Its because the ebXML

message schema has the element schema defined in the schema as below
>
> <element name="Schema">
> <complexType>
> <attribute name="location" type="anyURI" use="required" />
> <attribute name="version" type="tns:non-empty-string" />
> </complexType>
> </element>
>
> and if I change the "Schema" to something else, the error doesnt come.
> But this schema is from a ebXML.org and I dont have any control over

it..Is there someway I can go around within Biztalk without editing the
schema element name?[vbcol=seagreen]
> Thanks again
> Raj
>
> "Raj" wrote:
>
schemas.For example, the below schema I used in my earlier message
references the following[vbcol=seagreen]
successfully.When i try to validate the main schema , it ends up throwing
error BEC2012: Node "Schema" - Specify a valid .NET type name for this root
node. The current .NET type name of this root node is invalid[vbcol=seagreen]
"ebXMLMessage" but still it throws the same error message.Irrespective of
what name i use, it still throws the same error message.Seems like Iam
really missing some piece here![vbcol=seagreen]


Raj

2004-07-09, 3:32 pm

Chris,
Target namespace for the element "Schema" is
http://www.oasis-open.org/committee...-header-2_0.xsd
Seems like schema is a biztalk/C# keyword!

Any thoughts?
Thanks again
Raj


"Christof [MVP]" wrote:

> To what namespace is the Schema node targetted please? I guess, this should
> be supported... If they don't, you might raise an issue for PSS.
>
> Best regards,
> Christof
>
> --
> Christof [Microsoft BizTalk Server MVP]
>
>
> "Raj" <Raj@discussions.microsoft.com> wrote in message
> news:51CC5B30-5977-4D3F-B00E-526373C60B4D@microsoft.com...
> message schema has the element schema defined in the schema as below
> it..Is there someway I can go around within Biztalk without editing the
> schema element name?
> schemas.For example, the below schema I used in my earlier message
> references the following
> successfully.When i try to validate the main schema , it ends up throwing
> error BEC2012: Node "Schema" - Specify a valid .NET type name for this root
> node. The current .NET type name of this root node is invalid
> "ebXMLMessage" but still it throws the same error message.Irrespective of
> what name i use, it still throws the same error message.Seems like Iam
> really missing some piece here!
>
>
>

Tatyana Yakushev [MSFT]

2004-07-09, 5:48 pm

If any of the Root nodes uses reserved C# word or collides with any of the class names/namespace, you have to set "RootNode TypeName" property for that root.

Can you summarize all the problems that you didn't solve yet? The thread is getting long...

Thanks,
Tatyana
--------------------
Thread-Topic: Biztalk message creation without Schema in the project
thread-index: AcRk/ewUOFKgGKroSXmRfbK6fYQzFA==
X-WBNR-Posting-Host: 65.206.140.228
From: =?Utf-8?B?UmFq?= <Raj@discussions.microsoft.com>
References: <45BFEDB1-7B4B-4CB2-A523-9D41A193025D@microsoft.com> <ef$GGVLUEHA.228@TK2MSFTNGP10.phx.gbl> <03F53CFF-4B40-4404-B92D-
FD11847AA625@microsoft.com> <#S7XtsVUEHA.2840@TK2MSFTNGP11.phx.gbl> <B2B69BB0-1EDF-4C71-B0A6-E3E3736C37D4@microsoft.com>
<#JMnn1nYEHA.4004@TK2MSFTNGP10.phx.gbl> <D4407019-0360-4397-B877-812760E8ECE3@microsoft.com> <#NbH#OFZEHA.3692
@TK2MSFTNGP09.phx.gbl> <85012C25-BA47-41E8-A9D5-CE4EAE06EB9F@microsoft.com>
Subject: Re: Biztalk message creation without Schema in the project
Date: Thu, 8 Jul 2004 08:12:02 -0700
Lines: 27
Message-ID: <51CC5B30-5977-4D3F-B00E-526373C60B4D@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.biztalk.framework
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.framework:3073
X-Tomcat-NG: microsoft.public.biztalk.framework

Chris,
Ok, I found the reason for the BEC2012 error..Its because the ebXML message schema has the element schema defined in the schema as below

<element name="Schema">
<complexType>
<attribute name="location" type="anyURI" use="required" />
<attribute name="version" type="tns:non-empty-string" />
</complexType>
</element>

and if I change the "Schema" to something else, the error doesnt come.
But this schema is from a ebXML.org and I dont have any control over it..Is there someway I can go around within Biztalk without editing the schema element
name?
Thanks again
Raj

"Raj" wrote:

> Christof,
> Ok,I see!Now, I have imported all the schemas imported by my std schemas.For example, the below schema I used in my earlier message references the

following
> 1. envelope.xsd,
> 2. xlink.xsd,
> 3. xml.xsd,
> 4. xmldsig-core-schema.xsd
> I included them all as part of my Biztalk project and validated them successfully.When i try to validate the main schema , it ends up throwing error BEC2012:

Node "Schema" - Specify a valid .NET type name for this root node. The current .NET type name of this root node is invalid
> So, I went ahead and changed the Typename in the properties to say "ebXMLMessage" but still it throws the same error message.Irrespective of what name i

use, it still throws the same error message.Seems like Iam really missing some piece here!
> Thanks again for your response.I do really appreciate it
> Raj




--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
Raj

2004-07-16, 5:50 pm

Tatyana/Chris,
I think all my queries are answered.
Thanks a lot guys!
Raj

"Tatyana Yakushev [MSFT]" wrote:

> If any of the Root nodes uses reserved C# word or collides with any of the class names/namespace, you have to set "RootNode TypeName" property for that root.
>
> Can you summarize all the problems that you didn't solve yet? The thread is getting long...
>
> Thanks,
> Tatyana
> --------------------
> Thread-Topic: Biztalk message creation without Schema in the project
> thread-index: AcRk/ewUOFKgGKroSXmRfbK6fYQzFA==
> X-WBNR-Posting-Host: 65.206.140.228
> From: =?Utf-8?B?UmFq?= <Raj@discussions.microsoft.com>
> References: <45BFEDB1-7B4B-4CB2-A523-9D41A193025D@microsoft.com> <ef$GGVLUEHA.228@TK2MSFTNGP10.phx.gbl> <03F53CFF-4B40-4404-B92D-
> FD11847AA625@microsoft.com> <#S7XtsVUEHA.2840@TK2MSFTNGP11.phx.gbl> <B2B69BB0-1EDF-4C71-B0A6-E3E3736C37D4@microsoft.com>
> <#JMnn1nYEHA.4004@TK2MSFTNGP10.phx.gbl> <D4407019-0360-4397-B877-812760E8ECE3@microsoft.com> <#NbH#OFZEHA.3692
> @TK2MSFTNGP09.phx.gbl> <85012C25-BA47-41E8-A9D5-CE4EAE06EB9F@microsoft.com>
> Subject: Re: Biztalk message creation without Schema in the project
> Date: Thu, 8 Jul 2004 08:12:02 -0700
> Lines: 27
> Message-ID: <51CC5B30-5977-4D3F-B00E-526373C60B4D@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.biztalk.framework
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa06.phx.gbl microsoft.public.biztalk.framework:3073
> X-Tomcat-NG: microsoft.public.biztalk.framework
>
> Chris,
> Ok, I found the reason for the BEC2012 error..Its because the ebXML message schema has the element schema defined in the schema as below
>
> <element name="Schema">
> <complexType>
> <attribute name="location" type="anyURI" use="required" />
> <attribute name="version" type="tns:non-empty-string" />
> </complexType>
> </element>
>
> and if I change the "Schema" to something else, the error doesnt come.
> But this schema is from a ebXML.org and I dont have any control over it..Is there someway I can go around within Biztalk without editing the schema element
> name?
> Thanks again
> Raj
>
> "Raj" wrote:
>
> following
> Node "Schema" - Specify a valid .NET type name for this root node. The current .NET type name of this root node is invalid
> use, it still throws the same error message.Seems like Iam really missing some piece here!
>
>
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
> Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated

Adrian

2004-11-23, 5:55 pm



"Raj" wrote:
[vbcol=seagreen]
> Tatyana/Chris,
> I think all my queries are answered.
> Thanks a lot guys!
> Raj
>
> "Tatyana Yakushev [MSFT]" wrote:
>
Adrian

2004-11-23, 5:55 pm

Raj
If you change the Type of each schema then you don't have to change the node
names. To do this simply click on your schema, then select the properties
box. Find the Type attribute and change the name from Schema to SchemaType
(for instance) this way the root node does not have the same names as the
Type. Type is just the name of the object that will be created in the
Assembly which represents the schema. I had the same error when trying to
build the OAGIS schemas and this fixed it. However, I got another error that
I haven't figured out yet and have posted about.
AD

"Raj" wrote:
[vbcol=seagreen]
> Tatyana/Chris,
> I think all my queries are answered.
> Thanks a lot guys!
> Raj
>
> "Tatyana Yakushev [MSFT]" wrote:
>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com
<