scheu       02/04/24 10:13:02

  Modified:    java/src/org/apache/axis/wsdl/toJava Utils.java
               java/test/wsdl/types ComprehensiveTypes.wsdl
  Log:
  John Colgrave of IBM reported a WSDL2Java bug involving anon type definitions under
  an attribute element.
  
  One line fix to get the proper anonymous name.
  
  Added a change to the comprehensiveTest to verify.
  
  Revision  Changes    Path
  1.27      +2 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java
  
  Index: Utils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Utils.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Utils.java        17 Apr 2002 17:50:16 -0000      1.26
  +++ Utils.java        24 Apr 2002 17:13:02 -0000      1.27
  @@ -247,7 +247,8 @@
                   QName kind = getNodeQName(search);
                   if (kind.getLocalPart().equals("schema")) {
                       search = null;
  -                } else if (kind.getLocalPart().equals("element")) {
  +                } else if (kind.getLocalPart().equals("element") ||
  +                           kind.getLocalPart().equals("attribute")) {
                       localName = SymbolTable.ANON_TOKEN +
                           getNodeNameQName(search).getLocalPart();
                       search = search.getParentNode();
  
  
  
  1.27      +9 -0      xml-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl
  
  Index: ComprehensiveTypes.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ComprehensiveTypes.wsdl   22 Apr 2002 17:33:32 -0000      1.26
  +++ ComprehensiveTypes.wsdl   24 Apr 2002 17:13:02 -0000      1.27
  @@ -91,6 +91,15 @@
             </xsd:all>
             <xsd:attribute name="attr" type="typens:enum" />
             <xsd:attribute name="parmAttr" type="typens:StringParameter" />
  +          <xsd:attribute name="enumAttr">
  +            <xsd:simpleType>
  +              <xsd:restriction base="xsd:string">
  +                <xsd:enumeration value="one"/>                      
  +                <xsd:enumeration value="two"/>                    
  +                <xsd:enumeration value="three"/>                    
  +              </xsd:restriction>
  +            </xsd:simpleType>
  +          </xsd:attribute>
           </xsd:complexType>
         </xsd:element>
   
  
  
  


Reply via email to