DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15340>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15340 WSDL2java problem with union of NMTOKEN enumeration and NMTOKEN pattern restriction Summary: WSDL2java problem with union of NMTOKEN enumeration and NMTOKEN pattern restriction Product: Axis Version: 1.1beta Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Enhancement Priority: Other Component: WSDL processing AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 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