Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
1.1beta
-
None
-
None
-
Operating System: Windows NT/2K
Platform: PC
-
15340
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