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 ja...@apache.org on 2005/06/16 17:48:52 UTC

cvs commit: ws-axis/java/src/org/apache/axis/wsdl/toJava JavaGeneratorFactory.java

jayachandra    2005/06/16 08:48:52

  Modified:    java/src/org/apache/axis/wsdl/toJava
                        JavaGeneratorFactory.java
  Log:
  This is with reference to jira issue 2059. Please once see http://issues.apache.org/jira/browse/AXIS-2059.
  Looks like in the resolveNameClashes method of JavaGeneratorFactory, there is a mention of this particular common special case. By and large, things are taken care of but... when two names are clashing (note v.size() == 2 in line#1031 of JavaGeneratorFactory.java) and they correspond to the names of a type and an element, before deciding if resolution is not needed currently a check is performed if both the *qnames* of colliding element and type are equal or not. This QName exact match forces that, if same names are being used, an element can reference a type present only in its namespace. However as long as there is overall uniqueness amongst all the existing wsdl types, a type with the same name as that of element but from a different schema namespace can also be used as a reference for the element (as is the case described in the sample.wsdl provided here). Hence, I believe, this qname check should not be present.
  ant all-tests is verified before committing the patch.
  
  Revision  Changes    Path
  1.69      +1 -1      ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java
  
  Index: JavaGeneratorFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- JavaGeneratorFactory.java	2 May 2005 11:39:36 -0000	1.68
  +++ JavaGeneratorFactory.java	16 Jun 2005 15:48:52 -0000	1.69
  @@ -1044,7 +1044,7 @@
                       QName eType = Utils.getTypeQName(e.getNode(),
                               forElement, false);
   
  -                    if ((eType != null) && eType.equals(e.getQName())
  +                    if ((eType != null) 
                               && !forElement.value) {
                           resolve = false;
                       }