|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XSD to MXSD error |
« View previous topic :: View next topic » |
Author |
Message
|
jefflowrey |
Posted: Thu Jan 25, 2007 12:08 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You might need to create your MXSDs in a different order. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jan 25, 2007 2:14 am Post subject: XSD to MXSD error |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I'm trying to create a Message set based upon the GS1 (www.gs1.org V2.1 Order) e-Commerce message definitions. ( Toolkit 6.0.0.1 )
I downloaded the XSD's and during the creation of the component msxd files I get an error on the following xsd.
Code: |
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:eanucc="urn:ean.ucc:2" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="urn:ean.ucc:2" version="2.1"> <xsd:annotation>
</xsd:annotation>
<xsd:include schemaLocation="EntityIdentification.xsd"/>
<xsd:complexType name="AbstractCommandType" abstract="true">
</xsd:complexType>
<xsd:complexType name="CommandHeaderType" abstract="true">
<xsd:sequence>
<xsd:element name="entityIdentification" type="eanucc:EntityIdentificationType">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CommandType">
<xsd:sequence>
<xsd:element ref="eanucc:command">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="command" type="eanucc:AbstractCommandType" abstract="true">
</xsd:element>
</xsd:schema>
|
the error is as follows:-
2 The head element declaration 'urn:ean.ucc:2#command' is abstract and has no substitutable members, which is prohibited. Command.mxsd MS.X.GS1.Order/MS.X.GS1.Order/ucc/ean/_2 line 16 25 January 2007 09:20:08
Any pointers to rectifying this are welcome.[/b] _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 25, 2007 2:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Try importing the entire set of schemas using the command-line tool mqsicreatemsgdefs.exe.
When you have done that, if the problem is still there, delete the element from the message definition - it cannot possibly appear in an instance document anyway, because it is abstract and there are no other elements in its substitution group. |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jan 25, 2007 3:36 am Post subject: Next issue |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Thanks Kimbert,
I did the import and got the same problem. So I followed your suggestion and deleted the element and the error went away.
It did uncover another problem which I don't understand.
Code: |
<?xml version="1.0" encoding="UTF-8"?><schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.w3.org/2000/09/xmldsig#" version="0.1" elementFormDefault="qualified" finalDefault="" blockDefault="" attributeFormDefault="unqualified">
<element name="Signature" type="ds:SignatureType"/>
<complexType name="SignatureType" mixed="false">
<sequence>
<element ref="ds:SignedInfo"/>
<element ref="ds:SignatureValue"/>
<element ref="ds:KeyInfo" minOccurs="0"/>
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
<complexType name="CanonicalizationMethodType" mixed="true">
<sequence>
<any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="strict"/>
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<element name="SignatureValue" type="ds:SignatureValueType"/>
<complexType name="SignatureValueType" mixed="false">
<simpleContent>
<extension base="base64Binary">
<attribute name="Id" type="ID" use="optional"/>
</extension>
</simpleContent>
</complexType>
<element name="SignedInfo" type="ds:SignedInfoType"/>
<complexType name="SignedInfoType" mixed="false">
<sequence>
<element ref="ds:CanonicalizationMethod"/>
<element ref="ds:SignatureMethod"/>
<element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
rest of xsd removed
|
The error is as follows:-
Invalid content starting with element 'any'. The parent content model is <choice>, which can only contain '(annotation (0-1) , (element, group, sequence, choice) (0-UNBOUNDED))'. xmldsig-core-schema.mxsd
I don't quite understand what the wording of the error message means AFAIK, I see a reange of 0->Unbounded. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 25, 2007 3:44 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
rest of xsd removed |
Are you sure you removed the correct part of the xsd? The string '<choice> does not appear anywhere in the snippet which you quoted.
Regardless of this, I think you should run these schemas through a schema validation tool. It may be that WMB is correctly reporting that the schema is badly constructed. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|