Printer Services Mail Archive: PS> FW: [jira] Closed: (AXIS-

PS> FW: [jira] Closed: (AXIS-568) [xsd:union] WSDL2java problem with union of NMTOKEN enumeration and NMTOKEN pattern restriction

From: Hall, David M (CIP / DCL Vancouver) (dhall@hp.com)
Date: Thu Jul 29 2004 - 18:58:38 EDT

  • Next message: Masanori ITOH: "PS> Re: PWG-ANNOUNCE> PSI to Begin New Last Call Review"

    Good news! It will be interesting to try the latest axis toolset with
    semantic model union structure.

    -----Original Message-----
    From: axis-dev@ws.apache.org [mailto:axis-dev@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|\.)*&#x003A;(\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



    This archive was generated by hypermail 2b29 : Thu Jul 29 2004 - 18:59:22 EDT