Well, I myself don’t
use either Reference or any ##other elements so it doesn’t really matter
to me what you come up with. We use only a subset
of the standard to send e-invoices between parts in Sweden, mainly the public
sector. This is also why we can’t upgrade to 3.0 until they do. Thank you for your
help. Regards, Johannes From: Moberg Dale [mailto:dmoberg@axway.com] Hi I will forward your message to the OASIS ebMS TC to discuss issuing
an errata and also to consider suggested workarounds. UPA violations were found and fixed in the version 2 schema, but
somehow this one escaped detection either by the tools of the time and/or by
the people working on the schema. For the error you mention, it would be easier to create a Reference
element within the ebMS target namespace that wrappers the XMLDsig element. Or,
if the extension point is not needed, to simply remove the ‘any’
element that allows elements from ##other namespaces (a set that unfortunately
includes the XMLDsig namespace elements…). Someone may come up with yet
other options for workarounds. Do you have any preference about what direction is taken? Thanks for calling this to our attention. (Maybe this will be a good opportunity to move on to ebMS version 3
with a lot of updates that apply WS-* specifications to B2B QOS requirements!) Cordially, Dale Moberg From: Johannes Gustafsson
[mailto:johannes@inexchange.se] Hello, I am trying to validate incoming
soap-envelopes using .NET to see if they conform to this schema: http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd However, I get errors when trying to
load the schema. I use this code to load and compile the schema (in C#):
XmlSchemaSet schemaSet = new XmlSchemaSet();
XmlReaderSettings settings = new XmlReaderSettings();
settings.ProhibitDtd = false;
schemaSet.Add(@"http://www.w3.org/2000/09/xmldsig#",
XmlReader.Create(@"http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd", settings));
schemaSet.Add(@"http://www.w3.org/XML/1998/namespace",
XmlReader.Create(@"http://www.w3.org/2001/03/xml.xsd",
settings)); schemaSet.Add(@"http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", @"http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd");
schemaSet.Compile(); I get this error: "Wildcard '##other' allows element
'http://www.w3.org/2000/09/xmldsig#:Reference', and causes the content model to
become ambiguous. A content model must be formed such that during validation of
an element information item sequence, the particle contained directly,
indirectly or implicitly therein with which to attempt to validate each item in
the sequence in turn can be uniquely determined without examining the content
or attributes of that item, and without any information about the items in the
remainder of the sequence." To rule out a bug I .NET I also tried
using Altova:s xml parser (http://www.altova.com/altovaxml.html)
with the same result. The problem lies in line 129 in
msg-header-2_0.xsd:
<!-- 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>
The <any
namespace="##other"> tag allows any other element with a namespace
other than the target namespace (See http://www.w3.org/TR/xmlschema-0/#ref34). This should mean that the <element
ref="ds:Reference"> is not needed since the <any> element
includes it. If I remove the <element
ref="ds:Reference"> on line 128 the schema works. Has anyone else come across this? Regards, Johannes |