You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/11 15:49:51 UTC

[jira] Commented: (AXIS-1596) enum of QNames generates meaningless names

The following comment has been added to this issue:

     Author: Ashutosh Shahi
    Created: Mon, 11 Oct 2004 6:49 AM
       Body:
Simon,
      This happens because your QName contains a character which is not a valid java identifier (the character ":"). This will happen even when your string contains special characters which are not java identifiers. So this is not related to QName, its a general behavior.
     Not sure if this is a major bug, do we need to fix it?

Ashutosh
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1596?page=comments#action_53910

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1596

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1596
    Summary: enum of QNames generates meaningless names
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             1.2RC1

   Assignee: 
   Reporter: Simon Fell

    Created: Fri, 8 Oct 2004 11:37 AM
    Updated: Mon, 11 Oct 2004 6:49 AM
Environment: WinXP, JDK 1.4.02_5

Description:
running wsdl2java on a wsdl that includes an enumeration of qnames generates a class with values value1, value2, value3, value4 etc.

e.g.
<simpleType name="FaultCode">
 <restriction base="xsd:QName">
   <enumeration value="fns:API_CURRENTLY_DISABLED"/>
   <enumeration value="fns:API_DISABLED_FOR_ORG"/>
   <enumeration value="fns:EXCEEDED_ID_LIMIT"/>
   <enumeration value="fns:EXCEEDED_LEAD_CONVERT_LIMIT"/>
   <enumeration value="fns:EXCEEDED_MAX_SIZE_REQUEST"/>
   <enumeration value="fns:EXCEEDED_QUOTA"/>
 </restriction>
</simpleType>

generates a class with

    public static final javax.xml.namespace.QName _value1 = javax.xml.namespace.QName.valueOf("{urn:fault.enterprise.soap.sforce.com}API_CURRENTLY_DISABLED");
    public static final javax.xml.namespace.QName _value2 = javax.xml.namespace.QName.valueOf("{urn:fault.enterprise.soap.sforce.com}API_DISABLED_FOR_ORG");
    public static final javax.xml.namespace.QName _value3 = javax.xml.namespace.QName.valueOf("{urn:fault.enterprise.soap.sforce.com}EXCEEDED_ID_LIMIT");
    public static final javax.xml.namespace.QName _value4 = javax.xml.namespace.QName.valueOf("{urn:fault.enterprise.soap.sforce.com}EXCEEDED_LEAD_CONVERT_LIMIT");
    public static final javax.xml.namespace.QName _value5 = javax.xml.namespace.QName.valueOf("{urn:fault.enterprise.soap.sforce.com}EXCEEDED_MAX_SIZE_REQUEST");
    public static final javax.xml.namespace.QName _value6 = javax.xml.namespace.QName.valueOf("{urn:fault.enterprise.soap.sforce.com}EXCEEDED_QUOTA");

public static final FaultCode value1 = new FaultCode(_value1);
    public static final FaultCode value2 = new FaultCode(_value2);
    public static final FaultCode value3 = new FaultCode(_value3);
    public static final FaultCode value4 = new FaultCode(_value4);
    public static final FaultCode value5 = new FaultCode(_value5);
    public static final FaultCode value6 = new FaultCode(_value6);
    
names should be generated from the qname value like a string enumeration does.


---------------------------------------------------------------------
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