Hi,
It looks like at least the Axis toolset now supports xsd:union.
Cheers,
- Ira
Ira McDonald (Musician / Software Architect)
Blue Roof Music / High North Inc
PO Box 221 Grand Marais, MI 49839
phone: +1-906-494-2434
email: imcdonald at sharplabs.com
-----Original Message-----
From: owner-ps at pwg.org [mailto:owner-ps at pwg.org]On Behalf Of Hall, David
M (CIP / DCL Vancouver)
Sent: Thursday, July 29, 2004 6:59 PM
To: ps at pwg.org
Subject: PS> FW: [jira] Closed: (AXIS-568) [xsd:union] WSDL2java problem
with union of NMTOKEN enumeration and NMTOKEN pattern restriction
Good news! It will be interesting to try the latest axis toolset with
semantic model union structure.
-----Original Message-----
From: axis-dev at ws.apache.org [mailto:axis-dev at ws.apache.org]
Sent: Thursday, July 29, 2004 2:44 PM
To: Hall, David M (CIP / DCL Vancouver)
Subject: [jira] Closed: (AXIS-568) [xsd:union] WSDL2java problem with
union of NMTOKEN enumeration and NMTOKEN pattern restriction
Message:
The following issue has been closed.
Resolver: Jarek Gawor
Date: Thu, 29 Jul 2004 2:42 PM
Basic union support was added to Axis. Please try with latest code.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXIS-568
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXIS-568
Summary: [xsd:union] WSDL2java problem with union of NMTOKEN
enumeration and NMTOKEN pattern restriction
Type: Bug
Status: Closed
Resolution: FIXED
Project: Axis
Components:
WSDL processing
Versions:
1.1beta
Assignee:
Reporter: David Hall
Created: Thu, 12 Dec 2002 11:11 PM
Updated: Thu, 29 Jul 2004 2:42 PM
Environment: Operating System: Windows NT/2K
Platform: PC
Description:
We are utilizing the Axis toolkit for creating a sample Printer Working
Group
PSI server and client. See http://www.pwg.org/ps for details on the
project.
The PSI interface is utilizing the PWG semantic model type definitions.
See
http://www.pwg.org/sm for details.
In creating our interface defintions, we have run into a problem with
WSDL2java, and the following constructs:
<xs:simpleType name="CompressionWKV">
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="compress"/>
<xs:enumeration value="deflate"/>
<xs:enumeration value="gzip"/>
<xs:enumeration value="none"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="CompressionWKV" type="y:CompressionWKV"/>
<xs:simpleType name="KeywordNsExtensionPattern">
<xs:restriction base="xs:NMTOKEN">
<xs:pattern value="(\i|\d|\.)*:(\i|\d|\.)*"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="KeywordNsExtensionPattern"
type="y:KeywordNsExtensionPattern"/>
<xs:element name="Compression">
<xs:simpleType>
<xs:union memberTypes="y:CompressionWKV
y:KeywordNsExtensionPattern"/>
</xs:simpleType>
</xs:element>
If you specify the --all parameter for WSDL2java, the CompressionWKV and
KeywordNsExtensionPattern objects get correctly generated, but the
encapsulating Compression object ends up with no accessors, or member
variables.
It seems that the Compression object should end up with an NMTOKEN
member
variable, and the appropriate accessors. (Granted, restriction
validation will
come at a later date...)
This would allow a client to get an instance of the static enumeration,
and
then ask it for it's value, and set this in the containing Compression
class:
Compression.setValue(CompressionWKV._compress.getValue());
We've created a WSDL file that shows this, and I will attach along with
the
generated classes.
Also, we would be willing to contribute toolkit modifications to support
this
if it is not already in the works... (Suggestions on where to start???
:)
Thanks!
David Hall
Hewlett-Packard
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira