axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Venkat Reddy <vred...@gmail.com>
Subject Re: cvs commit: ws-axis/java/src/org/apache/axis/wsdl/symbolTable SymbolTable.java Utils.java
Date Sun, 17 Jul 2005 09:56:29 GMT
Tom,

In Amazon wsdl case, the element "Help" is referenced in two ways -
first as the wrapper element for the operation "Help", and then as a
child element of another wrapper element for another operation.
However, it is stored as anon type in the sybol table, and excluded by
the new logic added to Utils.java, as follows :

=================================
wsdl/symbolTable/Utils.java: line 529:
            // 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();
                  
                // [Venkat] this check excludes "Help" element from
being added to types.
                if (!
e.getQName().getLocalPart().startsWith(SymbolTable.ANON_TOKEN))
                    types.add(e);
            }
=================================

I think, either we need to fix the way anon types are identified, or
we need to remove the exclusion of anon types from being generated.

-- Venkat


On 7/15/05, Tom Jordahl <tomj@macromedia.com> wrote:
> Hi Venkat,
> 
> I was trying to make sure that anonymous types did not show up in the
> deploy.wsdd.  I also was seeing zillions of files getting generated from
> wrapped services that were never used since we were unwrapping the
> service.
> 
> This change fixed that.
> 
> Sounds like it doesn't handle the amazon.com service right.  I am not
> sure why, as this should only be filtering anonymous type references.
> 
> --
> Tom Jordahl
> Macromedia Server Development
> 
> > -----Original Message-----
> > From: Venkat Reddy [mailto:vreddyp@gmail.com]
> > Sent: Friday, July 15, 2005 8:39 AM
> > To: axis-dev@ws.apache.org; tomj@apache.org
> > Subject: Re: cvs commit:
> ws-axis/java/src/org/apache/axis/wsdl/symbolTable
> > SymbolTable.java Utils.java
> >
> > 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, tomj@apache.org <tomj@apache.org> 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;
> > >
> > >
> > >
> > >
>

Mime
View raw message