Tom,
I have traced the issue of AXIS-2107 (Amazon wsdl) to this commit. Can
you review these changes in Utils.java?
thanks
Venkat
On 3 Jun 2005 22:23:50 -0000, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> tomj 2005/06/03 15:23:50
>
> Modified: java/src/org/apache/axis/wsdl/symbolTable SymbolTable.java
> Utils.java
> Log:
> Utils.java:
> - Prevent anonymous types from being marked as referenced when the
> xsd:anyType is used in the WSDL.
> This was causing the types to be emitted and the deploy.wsdd file
> would have typemappings for these (made up) QNames.
>
> Test case will follow in test/wsdl/query when I fix some other bugs.
>
> SymbolTable.java:
> - Add a comment
>
> Revision Changes Path
> 1.120 +7 -1
> ws-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java
>
> Index: SymbolTable.java
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java,v
> retrieving revision 1.119
> retrieving revision 1.120
> diff -u -r1.119 -r1.120
> --- SymbolTable.java 13 Apr 2005 16:22:52 -0000 1.119
> +++ SymbolTable.java 3 Jun 2005 22:23:50 -0000 1.120
> @@ -3287,7 +3287,13 @@
> continue;
> }
>
> - if ((refType != null) && !refType.equals(nestedType)
> + // If this entry has a referenced type that isn't
> + // the same as the nested type
> + // AND the OnlyLiteral reference switch is on
> + // THEN turn the OnlyLiteral reference switch off.
> + // If only someone had put a comment here saying why we do
> this...
> + if ((refType != null)
> + && !refType.equals(nestedType)
> && nestedType.isOnlyLiteralReferenced()) {
> nestedType.setOnlyLiteralReference(false);
> }
>
>
>
> 1.45 +10 -9
> ws-axis/java/src/org/apache/axis/wsdl/symbolTable/Utils.java
>
> Index: Utils.java
> ===================================================================
> RCS file:
> /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/symbolTable/Utils.java,v
> retrieving revision 1.44
> retrieving revision 1.45
> diff -u -r1.44 -r1.45
> --- Utils.java 4 Mar 2005 08:43:52 -0000 1.44
> +++ Utils.java 3 Jun 2005 22:23:50 -0000 1.45
> @@ -22,12 +22,7 @@
>
> import javax.xml.namespace.QName;
> import javax.xml.rpc.holders.BooleanHolder;
> -import java.util.HashMap;
> -import java.util.HashSet;
> -import java.util.Iterator;
> -import java.util.Map;
> -import java.util.StringTokenizer;
> -import java.util.Vector;
> +import java.util.*;
>
> /**
> * This class contains static utility methods for the emitter.
> @@ -526,12 +521,18 @@
>
> if ((type != null) && (type.getNode() != null)) {
> getDerivedTypes(type, types, symbolTable);
> - } else if (Constants.isSchemaXSD(type.getQName().getNamespaceURI())
> + }
> + else if (type != null &&
> Constants.isSchemaXSD(type.getQName().getNamespaceURI())
> && (type.getQName().getLocalPart().equals("anyType")
> || type.getQName().getLocalPart().equals("any"))) {
>
> - // All types are derived from anyType
> - types.addAll(symbolTable.getTypeIndex().values());
> + // All types are derived from anyType, except anonymous ones
> + final Collection typeValues =
> symbolTable.getTypeIndex().values();
> + for (Iterator it = typeValues.iterator(); it.hasNext();) {
> + SymTabEntry e = (SymTabEntry) it.next();
> + if (!
> e.getQName().getLocalPart().startsWith(SymbolTable.ANON_TOKEN))
> + types.add(e);
> + }
> }
>
> return types;
>
>
>
>