axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Jordahl" <t...@macromedia.com>
Subject RE: cvs commit: ws-axis/java/src/org/apache/axis/wsdl/symbolTable SchemaUtils.java SymbolTable.java
Date Fri, 29 Jul 2005 17:11:28 GMT
Dims,
OK, that makes good sense.

Thanks!

--
Tom Jordahl
Macromedia Server Development

> -----Original Message-----
> From: Davanum Srinivas [mailto:davanum@gmail.com]
> Sent: Friday, July 29, 2005 11:04 AM
> To: axis-dev@ws.apache.org
> Subject: Re: cvs commit:
ws-axis/java/src/org/apache/axis/wsdl/symbolTable
> SchemaUtils.java SymbolTable.java
> 
> Sorry Tom. Latest Intellij screwed up.
> 
> Example from Paypal, when the ComplexType CategoryArrayType has a
> unbounded "ns:Category" Which is AN element, NOT a complexType. we
> were adding it to the symboltable as a UndefinedType and NOT has a
> UndefinedElement. So i added a param boolean holder
> getCollectionComponentQName to report back if the
> complexType/sequence/element has a ref to an element then that
> booleanholder is set to true. Also in getCollectionComponentQName, i
> made sure that ns:Category gets added as a DefinedElement to the
> symboltable by calling symbolTable.createTypeFromRef(node);
> 
> Sorry about that. It was a late night effort gone awry :)
> 
> 	<complexType name="CategoryArrayType">
> 		<sequence>
> 			<element ref="ns:Category" minOccurs="0"
> maxOccurs="unbounded"/>
> 		</sequence>
> 	</complexType>
> 	<element name="Category" type="ns:CategoryType"/>
> 	<complexType name="CategoryType">
> 		<annotation>
> 			<documentation>
>  			  Container for data on the primary category of
listing.
>  	           </documentation>
> 		</annotation>
> 		<sequence>
> 			<element name="AutoPayEnabled" type="xs:boolean"
> minOccurs="0"/>
> 			<element name="B2BVATEnabled" type="xs:boolean"
> minOccurs="0"/>
> 			<element name="CatalogEnabled" type="xs:boolean"
> minOccurs="0"/>
> 			<element name="CategoryID" type="xs:string"/>
> 			<element name="CategoryLevel" type="xs:int"
> minOccurs="0"/>
> 			<element name="CategoryName" type="xs:string"
> minOccurs="0"/>
> 			<element name="CategoryParentID"
type="xs:string"
> minOccurs="0"
> maxOccurs="unbounded"/>
> 			<element name="CategoryParentName"
type="xs:string"
> minOccurs="0"
> maxOccurs="unbounded"/>
> 			<element name="CSIDList" type="xs:string"
minOccurs="0"
> maxOccurs="unbounded">
> 				<annotation>
> 					<documentation>
>  			  		CSIDList is not present if
Attributes
> enabled.
>  	           		 </documentation>
> 				</annotation>
> 			</element>
> 			<element name="Expired" type="xs:boolean"
> minOccurs="0"/>
> 			<element name="IntlAutosFixedCat"
type="xs:boolean"
> minOccurs="0"/>
> 			<element name="LeafCategory" type="xs:boolean"
> minOccurs="0"/>
> 			<element name="Virtual" type="xs:boolean"
> minOccurs="0"/>
> 		</sequence>
> 	</complexType>
> 
> 
> 
> On 7/29/05, Tom Jordahl <tomj@macromedia.com> wrote:
> > Garg!
> >
> > Dims, why so many white space changes?  Do you have your IDE
configured
> > to remove white space at the end of lines?  Evil!  Turn that off.
> >
> > Anyway, what exactly did you do here?  Check in comments weren't
much
> > help.
> >
> > Thanks.
> >
> > --
> > Tom Jordahl
> > Macromedia Server Development
> >
> > > -----Original Message-----
> > > From: dims@apache.org [mailto:dims@apache.org]
> > > Sent: Thursday, July 28, 2005 11:29 PM
> > > To: ws-axis-cvs@apache.org
> > > Subject: cvs commit:
ws-axis/java/src/org/apache/axis/wsdl/symbolTable
> > > SchemaUtils.java SymbolTable.java
> > >
> > > dims        2005/07/28 20:28:44
> > >
> > >   Modified:    java/src/org/apache/axis/wsdl/symbolTable
> > SchemaUtils.java
> > >                         SymbolTable.java
> > >   Log:
> > >   Fix for AXIS-2113 - WSDL Generation Does Not Work With Paypal
> > >   Fix for AXIS-1993 - WSDL2Java 1.2 fails where 1.2RC3 worked (XML
> > > Signature XSD)
> > >
> > >   Revision  Changes    Path
> > >   1.62      +39 -30    ws-
> > > axis/java/src/org/apache/axis/wsdl/symbolTable/SchemaUtils.java
> > >
> > >   Index: SchemaUtils.java
> > >
===================================================================
> > >   RCS file: /home/cvs/ws-
> > > axis/java/src/org/apache/axis/wsdl/symbolTable/SchemaUtils.java,v
> > >   retrieving revision 1.61
> > >   retrieving revision 1.62
> > >   diff -u -r1.61 -r1.62
> > >   --- SchemaUtils.java        27 Jul 2005 20:39:35 -0000      1.61
> > >   +++ SchemaUtils.java        29 Jul 2005 03:28:43 -0000      1.62
> > >   @@ -17,6 +17,7 @@
> > >
> > >    import org.apache.axis.Constants;
> > >    import org.apache.axis.AxisProperties;
> > >   +import org.apache.axis.i18n.Messages;
> > >    import org.apache.axis.utils.JavaUtils;
> > >    import org.w3c.dom.DOMException;
> > >    import org.w3c.dom.Element;
> > >   @@ -33,6 +34,7 @@
> > >    import java.util.Set;
> > >    import java.util.StringTokenizer;
> > >    import java.util.Vector;
> > >   +import java.io.IOException;
> > >
> > >    /**
> > >     * This class contains static utility methods specifically for
> > schema
> > > type queries.
> > >   @@ -366,7 +368,7 @@
> > >
> > >                return v;
> > >            } else if (isXSDNode(node, "group")) {
> > >   -                   /*
> > >   +            /*
> > >                       * Does this else clause make any sense
anymore
> > if
> > >                       * we're treating refs to xs:groups like a
macro
> > > inclusion
> > >                       * into the referencing type?
> > >   @@ -678,25 +680,25 @@
> > >                Type type = (Type)
symbolTable.getTypeEntry(nodeType,
> > > false);
> > >
> > >                if (type != null && type.getNode() != null) {
> > >   -                           //v.add(new ElementDecl(type,
> > nodeName));
> > >   -                           Node node = type.getNode();
> > >   -                           NodeList children =
> > node.getChildNodes();
> > >   -                           for (int j = 0; j <
> > children.getLength(); j++) {
> > >   -                                   QName subNodeKind =
> > > Utils.getNodeQName(children.item(j));
> > >   -                                   if ((subNodeKind != null)
> > >   -                                           &&
> > Constants.isSchemaXSD(
> > >   -
> > subNodeKind.getNamespaceURI()))
> > > {
> > >   -                                           if
> > > (subNodeKind.getLocalPart().equals("sequence")) {
> > >   -
> > >       v.addAll(processSequenceNode(children.item(j),
> > >   -
> > symbolTable));
> > >   -                                           } else if
> > > (subNodeKind.getLocalPart().equals("all")) {
> > >   -
> > >       v.addAll(processAllNode(children.item(j), symbolTable));
> > >   -                                                   } else if
> > > (subNodeKind.getLocalPart().equals("choice")) {
> > >   -
> > >       v.addAll(processChoiceNode(children.item(j),
> > >   -
> > symbolTable));
> > >   -                                           }
> > >   -                                   }
> > >   -                           }
> > >   +                //v.add(new ElementDecl(type, nodeName));
> > >   +                Node node = type.getNode();
> > >   +                NodeList children = node.getChildNodes();
> > >   +                for (int j = 0; j < children.getLength(); j++)
{
> > >   +                    QName subNodeKind =
> > > Utils.getNodeQName(children.item(j));
> > >   +                    if ((subNodeKind != null)
> > >   +                        && Constants.isSchemaXSD(
> > >   +                            subNodeKind.getNamespaceURI())) {
> > >   +                        if
> > > (subNodeKind.getLocalPart().equals("sequence")) {
> > >   +
> > > v.addAll(processSequenceNode(children.item(j),
> > >   +                                 symbolTable));
> > >   +                        } else if
> > > (subNodeKind.getLocalPart().equals("all")) {
> > >   +
> > v.addAll(processAllNode(children.item(j),
> > > symbolTable));
> > >   +                            } else if
> > > (subNodeKind.getLocalPart().equals("choice")) {
> > >   +
> > > v.addAll(processChoiceNode(children.item(j),
> > >   +                                    symbolTable));
> > >   +                        }
> > >   +                    }
> > >   +                }
> > >                }
> > >            }
> > >            return v;
> > >   @@ -806,8 +808,8 @@
> > >                    }
> > >                }
> > >                else {
> > >   -                           elem.setMaxOccursIsExactlyOne(true);
> > >   -                   }
> > >   +                elem.setMaxOccursIsExactlyOne(true);
> > >   +            }
> > >                elem.setNillable(
> > >                        JavaUtils.isTrueExplicitly(
> > >                                Utils.getAttribute(elementNode,
> > > "nillable")));
> > >   @@ -1320,12 +1322,13 @@
> > >                                                   IntHolder dims,
> > >                                                   BooleanHolder
> > > underlTypeNillable,
> > >                                                   QNameHolder
> > itemQName,
> > >   +                                               BooleanHolder
> > > forElement,
> > >                                                   SymbolTable
> > symbolTable)
> > > {
> > >
> > >            dims.value = 1;    // assume 1 dimension
> > >            underlTypeNillable.value = false; // assume underlying
type
> > is
> > > not nillable
> > >
> > >   -        QName qName = getCollectionComponentQName(node,
itemQName);
> > >   +        QName qName = getCollectionComponentQName(node,
itemQName,
> > > forElement, symbolTable);
> > >
> > >            if (qName == null) {
> > >                qName = getArrayComponentQName_JAXRPC(node, dims,
> > > underlTypeNillable, symbolTable);
> > >   @@ -1355,7 +1358,9 @@
> > >         * @return QName of the compoent of the collection
> > >         */
> > >        public static QName getCollectionComponentQName(Node node,
> > >   -                                                    QNameHolder
> > > itemQName) {
> > >   +                                                    QNameHolder
> > > itemQName,
> > >   +
BooleanHolder
> > > forElement,
> > >   +                                                    SymbolTable
> > > symbolTable) {
> > >            // If we're going to turn "wrapped" arrays into types
such
> > that
> > >            // <complexType><sequence>
> > >            //   <element name="foo" type="xs:string"
> > > maxOccurs="unbounded"/>
> > >   @@ -1397,6 +1402,11 @@
> > >                // continue the processing using that element ...
> > >                node = element;
> > >                storeComponentQName = true;
> > >   +            try {
> > >   +                symbolTable.createTypeFromRef(node);
> > >   +            } catch (IOException e) {
> > >   +                throw new
> > > RuntimeException(Messages.getMessage("exception01",e.toString()));
> > >   +            }
> > >            }
> > >
> > >            // If the node kind is an element, dive to get its
type.
> > >   @@ -1404,7 +1414,6 @@
> > >
> > >                // Compare the componentQName with the name of the
> > >                // full name.  If different, return componentQName
> > >   -            BooleanHolder forElement = new BooleanHolder();
> > >                QName componentTypeQName = Utils.getTypeQName(node,
> > >
> > forElement,
> > >
true);
> > >   @@ -1755,13 +1764,13 @@
> > >            // XXX - this may need to be revisited.
> > >            if ((type != null) && (attributeName != null)) {
> > >                ContainedAttribute attr =
> > >   -           new ContainedAttribute(type, attributeName);
> > >   +            new ContainedAttribute(type, attributeName);
> > >
> > >   -       String useValue = Utils.getAttribute(child, "use");
> > >   +        String useValue = Utils.getAttribute(child, "use");
> > >
> > >   -       if (useValue != null) {
> > >   -
attr.setOptional(useValue.equalsIgnoreCase("optional"));
> > >   -       }
> > >   +        if (useValue != null) {
> > >   +
attr.setOptional(useValue.equalsIgnoreCase("optional"));
> > >   +        }
> > >
> > >                v.add(attr);
> > >            }
> > >
> > >
> > >
> > >   1.126     +155 -151  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.125
> > >   retrieving revision 1.126
> > >   diff -u -r1.125 -r1.126
> > >   --- SymbolTable.java        20 Jul 2005 17:00:00 -0000
1.125
> > >   +++ SymbolTable.java        29 Jul 2005 03:28:43 -0000
1.126
> > >   @@ -1188,6 +1188,7 @@
> > >                    // If we're supposed to unwrap arrays, supply
> > someplace
> > > to put the "inner" QName
> > >                    // so we can propagate it into the appropriate
> > metadata
> > > container.
> > >                    QNameHolder itemQName = wrapArrays ? null : new
> > > QNameHolder();
> > >   +                BooleanHolder forElement2 = new
BooleanHolder();
> > >
> > >                    numDims.value = 0;
> > >
> > >   @@ -1196,6 +1197,7 @@
> > >
numDims,
> > >
> > > underlTypeNillable,
> > >
> > itemQName,
> > >   +
> > forElement2,
> > >
this);
> > >
> > >                    if (arrayEQName != null) {
> > >   @@ -1203,7 +1205,7 @@
> > >                        // Get the TypeEntry for the array element
type
> > >                        refQName = arrayEQName;
> > >
> > >   -                    TypeEntry refType = getTypeEntry(refQName,
> > false);
> > >   +                    TypeEntry refType = getTypeEntry(refQName,
> > > forElement2.value);
> > >
> > >                        if (refType == null) {
> > >    //                        arrayTypeQNames.add(refQName);
> > >   @@ -1213,6 +1215,8 @@
> > >
> > >                            if (baseName != null) {
> > >                                refType = new BaseType(refQName);
> > >   +                        } else if(forElement2.value) {
> > >   +                            refType = new
> > UndefinedElement(refQName);
> > >                            } else {
> > >                                refType = new
UndefinedType(refQName);
> > >                            }
> > >   @@ -1304,11 +1308,11 @@
> > >        /**
> > >         * Node may contain a reference (via type=, ref=, or
element=
> > > attributes) to
> > >         * another type.  Create a Type object representing this
> > referenced
> > > type.
> > >   -     *
> > >   -     * @param node
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param node
> > >   +     * @throws IOException
> > >         */
> > >   -    private void createTypeFromRef(Node node) throws
IOException {
> > >   +    protected void createTypeFromRef(Node node) throws
IOException
> > {
> > >
> > >            // Get the QName of the node's type attribute value
> > >            BooleanHolder forElement = new BooleanHolder();
> > >   @@ -1447,9 +1451,9 @@
> > >
> > >        /**
> > >         * Populate the symbol table with all of the MessageEntry's
> > from
> > > the Definition.
> > >   -     *
> > >   -     * @param def
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param def
> > >   +     * @throws IOException
> > >         */
> > >        private void populateMessages(Definition def) throws
> > IOException {
> > >
> > >   @@ -1477,7 +1481,7 @@
> > >         * <p/>
> > >         * <strong>Note</strong>: this method should throw a
> > > <code>javax.wsdl.WSDLException</code> rather than
> > >         * a <code>java.io.IOException</code>
> > >   -     *
> > >   +     *
> > >         * @param message the message object
> > >         * @throws IOException thrown, if the message is not valid
> > >         */
> > >   @@ -1486,7 +1490,7 @@
> > >
> > >            // make sure the message is not null (i.e. there is an
> > >            // attribute 'message ')
> > >   -        //
> > >   +        //
> > >            if (message == null) {
> > >                throw new IOException(
> > >                        "<input>,<output>, or <fault> in <operation
..>
> > > without attribute 'message' found. Attribute 'message' is
required.");
> > >   @@ -1494,7 +1498,7 @@
> > >
> > >            // make sure the value of the attribute refers to an
> > >            // already defined message
> > >   -        //
> > >   +        //
> > >            if (message.isUndefined()) {
> > >                throw new IOException(
> > >                        "<input ..>, <output ..> or <fault ..> in
> > > <portType> with undefined message found. message name is '"
> > >   @@ -1509,7 +1513,7 @@
> > >         * <p/>
> > >         * <strong>Note</strong>: this method should throw a
> > > <code>javax.wsdl.WSDLException</code>
> > >         * rather than a <code>java.io.IOException</code>
> > >   -     *
> > >   +     *
> > >         * @param operation the operation element
> > >         * @throws IOException              thrown, if the element
is
> > not
> > > valid.
> > >         * @throws IllegalArgumentException thrown, if operation is
> > null
> > >   @@ -1524,7 +1528,7 @@
> > >
> > >            Input input = operation.getInput();
> > >            Message message;
> > >   -
> > >   +
> > >            if (input != null) {
> > >                message = input.getMessage();
> > >                if (message == null) {
> > >   @@ -1557,7 +1561,7 @@
> > >                    message = fault.getMessage();
> > >                    if (message == null) {
> > >                        throw new IOException(
> > >   -                            "No 'message' attribute in <fault>
> > named '"
> > > +
> > >   +                            "No 'message' attribute in <fault>
> > named '"
> > > +
> > >                                fault.getName() + "' for operation
'" +
> > >                                operation.getName() + "'");
> > >                    }
> > >   @@ -1572,7 +1576,7 @@
> > >         * <p/>
> > >         * <strong>Note</strong>: this method should throw a
> > > <code>javax.wsdl.WSDLException</code>
> > >         * rather than a <code>java.io.IOException</code>
> > >   -     *
> > >   +     *
> > >         * @param portType the portType element
> > >         * @throws IOException              thrown, if the element
is
> > not
> > > valid.
> > >         * @throws IllegalArgumentException thrown, if operation is
> > null
> > >   @@ -1588,13 +1592,13 @@
> > >            List operations = portType.getOperations();
> > >
> > >            // no operations defined ? -> valid according to the
WSDL
> > 1.1
> > > schema
> > >   -        //
> > >   +        //
> > >            if ((operations == null) || (operations.size() == 0)) {
> > >                return;
> > >            }
> > >
> > >            // check operations defined in this portType
> > >   -        //
> > >   +        //
> > >            Iterator it = operations.iterator();
> > >
> > >            while (it.hasNext()) {
> > >   @@ -1606,9 +1610,9 @@
> > >
> > >        /**
> > >         * Populate the symbol table with all of the
PortTypeEntry's
> > from
> > > the Definition.
> > >   -     *
> > >   -     * @param def
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param def
> > >   +     * @throws IOException
> > >         */
> > >        private void populatePortTypes(Definition def) throws
> > IOException {
> > >
> > >   @@ -1632,8 +1636,8 @@
> > >
> > >        /**
> > >         * Create the parameters and store them in the
bindingEntry.
> > >   -     *
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @throws IOException
> > >         */
> > >        private void populateParameters() throws IOException {
> > >
> > >   @@ -1690,12 +1694,12 @@
> > >         * There is a bit of processing that is needed to write the
> > > interface, stub, and skeleton.
> > >         * Rather than do that processing 3 times, it is done once,
> > here,
> > > and stored in the
> > >         * Parameters object.
> > >   -     *
> > >   -     * @param operation
> > >   -     * @param namespace
> > >   -     * @param bindingEntry
> > >   -     * @return
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param operation
> > >   +     * @param namespace
> > >   +     * @param bindingEntry
> > >   +     * @return
> > >   +     * @throws IOException
> > >         */
> > >        public Parameters getOperationParameters(
> > >                Operation operation, String namespace, BindingEntry
> > > bindingEntry)
> > >   @@ -1715,9 +1719,9 @@
> > >
> > >            Input input = operation.getInput();
> > >            Output output = operation.getOutput();
> > >   -
> > >   +
> > >            parameters.mep = operation.getStyle();
> > >   -
> > >   +
> > >            // All input parts MUST be in the parameterOrder list.
It
> > is
> > > an error otherwise.
> > >            if (parameterOrder != null && !wrapped) {
> > >                if (input != null) {
> > >   @@ -1791,7 +1795,7 @@
> > >            // instead of: void echo(StringHolder inout)
> > >            // Do this:  string echo(string in)
> > >            if (wrapped && (inputs.size() == 1) && (outputs.size()
==
> > 1)
> > >   -                &&
> > >   +                &&
> > >                    Utils.getLastLocalPart(((Parameter)
> > > inputs.get(0)).getName()).equals(
> > >                    Utils.getLastLocalPart(((Parameter)
> > > outputs.get(0)).getName()))
> > >                    ) {
> > >   @@ -1859,10 +1863,10 @@
> > >
> > >        /**
> > >         * Return the index of the given name in the given Vector,
-1
> > if it
> > > doesn't exist.
> > >   -     *
> > >   -     * @param name
> > >   -     * @param v
> > >   -     * @return
> > >   +     *
> > >   +     * @param name
> > >   +     * @param v
> > >   +     * @return
> > >         */
> > >        private int getPartIndex(String name, Vector v) {
> > >            name = Utils.getLastLocalPart(name);
> > >   @@ -1879,13 +1883,13 @@
> > >
> > >        /**
> > >         * Add an in or inout parameter to the parameters object.
> > >   -     *
> > >   -     * @param inputs
> > >   -     * @param outputs
> > >   -     * @param index
> > >   -     * @param outdex
> > >   -     * @param parameters
> > >   -     * @param trimInput
> > >   +     *
> > >   +     * @param inputs
> > >   +     * @param outputs
> > >   +     * @param index
> > >   +     * @param outdex
> > >   +     * @param parameters
> > >   +     * @param trimInput
> > >         */
> > >        private void addInishParm(Vector inputs, Vector outputs,
int
> > index,
> > >                                  int outdex, Parameters
parameters,
> > >   @@ -1928,7 +1932,7 @@
> > >                    p.setMode(Parameter.INOUT);
> > >
> > >                    ++parameters.inouts;
> > >   -            }
> > >   +            }
> > >                /*
> > >                else if
> > (paramLastLocalPart.equals(outParamLastLocalPart))
> > > {
> > >                    outputs.remove(outdex);
> > >   @@ -1957,11 +1961,11 @@
> > >                }
> > >            */
> > >                else {
> > >   -
> > >   +
> > >                    // If we're here, we have both an input and an
> > output
> > >                    // part with the same name but different
types....
> > > guess
> > >                    // it's not really an inout....
> > >   -                //
> > >   +                //
> > >                    // throw new
> > > IOException(Messages.getMessage("differentTypes00",
> > >                    // new String[] { p.getName(),
> > >                    // p.getType().getQName().toString(),
> > >   @@ -1985,11 +1989,11 @@
> > >
> > >        /**
> > >         * Add an output parameter to the parameters object.
> > >   -     *
> > >   -     * @param outputs
> > >   -     * @param outdex
> > >   -     * @param parameters
> > >   -     * @param trim
> > >   +     *
> > >   +     * @param outputs
> > >   +     * @param outdex
> > >   +     * @param parameters
> > >   +     * @param trim
> > >         */
> > >        private void addOutParm(Vector outputs, int outdex,
Parameters
> > > parameters,
> > >                                boolean trim) {
> > >   @@ -2077,7 +2081,7 @@
> > >            // - That part is an element
> > >            // - That element has the same name as the operation
> > >            // - That element has no attributes (check done below)
> > >   -
> > >   +
> > >            if (!nowrap && literal && (numberOfElements == 1) &&
> > > possiblyWrapped) {
> > >                wrapped = true;
> > >            }
> > >   @@ -2136,7 +2140,7 @@
> > >                    // XML for literal parts that specify the type
> > > attribute,
> > >                    // (unless they're MIME types) abort processing
> > with an
> > >                    // error if we encounter this case
> > >   -                //
> > >   +                //
> > >                    // node = getTypeEntry(typeName,
false).getNode();
> > >                    String bindingName = (bindingEntry == null)
> > >                            ? "unknown"
> > >   @@ -2172,10 +2176,10 @@
> > >                }
> > >
> > >                Vector vTypes = null;
> > >   -
> > >   +
> > >                // If we have nothing at this point, we're in
trouble.
> > >                if (node == null) {
> > >   -              // If node is null, that means the element in
> > question
> > > has no type declaration,
> > >   +              // If node is null, that means the element in
> > question
> > > has no type declaration,
> > >                  // therefore is not a wrapper element.
> > >                  wrapped = false;
> > >                    if (verbose) {
> > >   @@ -2188,7 +2192,7 @@
> > >                        // can't do wrapped mode
> > >                        wrapped = false;
> > >                    }
> > >   -
> > >   +
> > >                    if (!SchemaUtils.isWrappedType(node)) {
> > >                        // mark the type entry as not just literal
> > > referenced
> > >                        // This doesn't work, but it may help in
the
> > > future.
> > >   @@ -2252,7 +2256,7 @@
> > >
> > >        /**
> > >         * Set the header information for this paramter
> > >   -     *
> > >   +     *
> > >         * @param param        Parameter to modify
> > >         * @param bindingEntry Binding info for this
> > operation/parameter
> > >         * @param opName       the operation we are processing
> > >   @@ -2314,10 +2318,10 @@
> > >
> > >        /**
> > >         * Method getBindedParameterName
> > >   -     *
> > >   -     * @param elements
> > >   -     * @param p
> > >   -     * @return
> > >   +     *
> > >   +     * @param elements
> > >   +     * @param p
> > >   +     * @return
> > >         */
> > >        private QName getBindedParameterName(List elements,
Parameter
> > p) {
> > >
> > >   @@ -2327,7 +2331,7 @@
> > >            // with its part name. The namespace used is the one of
the
> > > soap:header.
> > >            // When it is in the body, if there is a SOAPBody with
its
> > part
> > > name,
> > >            // the namespace used is the one of this soap:body.
> > >   -        //
> > >   +        //
> > >            // If the parameter is in the body and there is a
soap:body
> > > with no parts,
> > >            // its namespace is used for the parameter.
> > >            QName paramName = null;
> > >   @@ -2391,9 +2395,9 @@
> > >         * Set the MIME type.  This can be determine in one of two
> > ways:
> > >         * 1.  From WSDL 1.1 MIME constructs on the binding (passed
> > in);
> > >         * 2.  From AXIS-specific xml MIME types.
> > >   -     *
> > >   -     * @param p
> > >   -     * @param mimeInfo
> > >   +     *
> > >   +     * @param p
> > >   +     * @param mimeInfo
> > >         */
> > >        private void setMIMEInfo(Parameter p, MimeInfo mimeInfo) {
> > >
> > >   @@ -2422,9 +2426,9 @@
> > >
> > >        /**
> > >         * Populate the symbol table with all of the BindingEntry's
> > from
> > > the Definition.
> > >   -     *
> > >   -     * @param def
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param def
> > >   +     * @throws IOException
> > >         */
> > >        private void populateBindings(Definition def) throws
> > IOException {
> > >
> > >   @@ -2571,13 +2575,13 @@
> > >
> > >        /**
> > >         * Fill in some binding information:  bodyType, mimeType,
> > header
> > > info.
> > >   -     *
> > >   -     * @param bEntry
> > >   -     * @param operation
> > >   -     * @param it
> > >   -     * @param faults
> > >   -     * @param input
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param bEntry
> > >   +     * @param operation
> > >   +     * @param it
> > >   +     * @param faults
> > >   +     * @param input
> > >   +     * @throws IOException
> > >         */
> > >        private void fillInBindingInfo(
> > >                BindingEntry bEntry, Operation operation, Iterator
it,
> > > ArrayList faults, boolean input)
> > >   @@ -2690,11 +2694,11 @@
> > >
> > >        /**
> > >         * Fill in DIME information
> > >   -     *
> > >   -     * @param unkElement
> > >   -     * @param input
> > >   -     * @param operation
> > >   -     * @param bEntry
> > >   +     *
> > >   +     * @param unkElement
> > >   +     * @param input
> > >   +     * @param operation
> > >   +     * @param bEntry
> > >         */
> > >        private void
fillInDIMEInformation(UnknownExtensibilityElement
> > > unkElement,
> > >                                           boolean input, Operation
> > > operation,
> > >   @@ -2780,12 +2784,12 @@
> > >
> > >        /**
> > >         * Get the faults from the soap:fault clause.
> > >   -     *
> > >   -     * @param binding
> > >   -     * @param bindOp
> > >   -     * @param operation
> > >   -     * @param faults
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param binding
> > >   +     * @param bindOp
> > >   +     * @param operation
> > >   +     * @param faults
> > >   +     * @throws IOException
> > >         */
> > >        private void faultsFromSOAPFault(
> > >                Binding binding, BindingOperation bindOp, Operation
> > > operation, ArrayList faults)
> > >   @@ -2879,11 +2883,11 @@
> > >
> > >        /**
> > >         * Set the body type.
> > >   -     *
> > >   -     * @param use
> > >   -     * @param bEntry
> > >   -     * @param operation
> > >   -     * @param input
> > >   +     *
> > >   +     * @param use
> > >   +     * @param bEntry
> > >   +     * @param operation
> > >   +     * @param input
> > >         */
> > >        private void setBodyType(String use,
> > >                                 BindingEntry bEntry,
> > >   @@ -2892,7 +2896,7 @@
> > >        {
> > >
> > >            if (use == null) {
> > >   -            // Deprecated
> > >   +            // Deprecated
> > >                // throw new
IOException(Messages.getMessage("noUse",
> > >                //        operation.getName()));
> > >                // for WS-I BP 1.0 R2707.
> > >   @@ -2909,12 +2913,12 @@
> > >         * Add the parts that are really MIME types as MIME types.
> > >         * A side effect is to return the body Type of the given
> > >         * MIMEMultipartRelated object.
> > >   -     *
> > >   -     * @param bEntry
> > >   -     * @param mpr
> > >   -     * @param op
> > >   -     * @return
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param bEntry
> > >   +     * @param mpr
> > >   +     * @param op
> > >   +     * @return
> > >   +     * @throws IOException
> > >         */
> > >        private Use addMIMETypes(
> > >                BindingEntry bEntry, MIMEMultipartRelated mpr,
> > Operation
> > > op)
> > >   @@ -3000,10 +3004,10 @@
> > >
> > >        /**
> > >         * Method findPart
> > >   -     *
> > >   -     * @param operation
> > >   -     * @param partName
> > >   -     * @return
> > >   +     *
> > >   +     * @param operation
> > >   +     * @param partName
> > >   +     * @return
> > >         */
> > >        private TypeEntry findPart(Operation operation, String
> > partName) {
> > >
> > >   @@ -3022,10 +3026,10 @@
> > >
> > >        /**
> > >         * Method findPart
> > >   -     *
> > >   -     * @param iterator
> > >   -     * @param partName
> > >   -     * @return
> > >   +     *
> > >   +     * @param iterator
> > >   +     * @param partName
> > >   +     * @return
> > >         */
> > >        private TypeEntry findPart(Iterator iterator, String
partName)
> > {
> > >
> > >   @@ -3050,13 +3054,13 @@
> > >
> > >        /**
> > >         * Populate the symbol table with all of the ServiceEntry's
> > from
> > > the Definition.
> > >   -     *
> > >   -     * @param def
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param def
> > >   +     * @throws IOException
> > >         */
> > >
> > >        private void populateServices(Definition def) throws
> > IOException {
> > >   -           String originalName = null;
> > >   +           String originalName = null;
> > >            Iterator i = def.getServices().values().iterator();
> > >
> > >            while (i.hasNext()) {
> > >   @@ -3068,7 +3072,7 @@
> > >                        ||
> > service.getQName().getLocalPart().equals("")) {
> > >                    throw new
> > > IOException(Messages.getMessage("BadServiceName00"));
> > >                }
> > >   -
> > >   +
> > >                // behave as though backslashes were never there
> > >
> > >
> >
service.setQName(BackslashUtil.getQNameWithBackslashlessLocal(service.ge
> > tQ
> > > Name()));
> > >                ServiceEntry sEntry = new ServiceEntry(service);
> > >   @@ -3083,7 +3087,7 @@
> > >        /**
> > >         * populates the symbol table with port elements defined
within
> > a
> > > &lt;service&gt;
> > >         * element.
> > >   -     *
> > >   +     *
> > >         * @param ports a map of name->port pairs (i.e. what is
> > returned by
> > > service.getPorts()
> > >         * @throws IOException thrown, if an IO or WSDL error is
> > detected
> > >         * @see javax.wsdl.Service#getPorts()
> > >   @@ -3104,7 +3108,7 @@
> > >
> > >                // make sure there is a port name. The 'name'
attribute
> > for
> > > WSDL ports is
> > >                // mandatory
> > >   -            //
> > >   +            //
> > >                if (portName == null) {
> > >
> > >                    // REMIND: should rather be a
> > javax.wsdl.WSDLException
> > > ?
> > >   @@ -3114,7 +3118,7 @@
> > >
> > >                // make sure there is a binding for the port. The
> > 'binding'
> > > attribute for
> > >                // WSDL ports is mandatory
> > >   -            //
> > >   +            //
> > >                if (portBinding == null) {
> > >
> > >                    // REMIND: should rather be a
> > javax.wsdl.WSDLException
> > > ?
> > >   @@ -3124,19 +3128,19 @@
> > >
> > >                // make sure the port name is unique among all port
> > names
> > > defined in this
> > >                // WSDL document.
> > >   -            //
> > >   +            //
> > >                // NOTE: there's a flaw in
> > > com.ibm.wsdl.xml.WSDLReaderImpl#parsePort() and
> > >                // com.ibm.wsdl.xml.WSDLReaderImpl#addPort(). These
> > methods
> > > do not enforce
> > >                // the port name exists and is unique. Actually, if
two
> > > port definitions with
> > >                // the same name exist within the same service
element,
> > > only *one* port
> > >                // element is present after parsing and the
following
> > > exception is not thrown.
> > >   -            //
> > >   +            //
> > >                // If two ports with the same name exist in
different
> > > service elements,
> > >                // the exception below is thrown. This is
conformant to
> > the
> > > WSDL 1.1 spec (sec 2.6)
> > >                // , which states: "The name attribute provides a
> > unique
> > > name among all ports
> > >                // defined within in the enclosing WSDL document."
> > >   -            //
> > >   -            //
> > >   +            //
> > >   +            //
> > >                if (existsPortWithName(new QName(portName))) {
> > >
> > >                    // REMIND: should rather be a
> > javax.wsdl.WSDLException
> > > ?
> > >   @@ -3156,9 +3160,9 @@
> > >         * (An exception to the rule is that derived types are set
as
> > > referenced if
> > >         * their base type is referenced.  This is necessary to
support
> > > generation and
> > >         * registration of derived types.)
> > >   -     *
> > >   -     * @param def
> > >   -     * @param doc
> > >   +     *
> > >   +     * @param def
> > >   +     * @param doc
> > >         */
> > >        private void setReferences(Definition def, Document doc) {
> > >
> > >   @@ -3230,10 +3234,10 @@
> > >        /**
> > >         * Set the isReferenced flag to true on the given TypeEntry
and
> > all
> > >         * SymTabEntries that it refers to.
> > >   -     *
> > >   -     * @param entry
> > >   -     * @param doc
> > >   -     * @param literal
> > >   +     *
> > >   +     * @param entry
> > >   +     * @param doc
> > >   +     * @param literal
> > >         */
> > >        private void setTypeReferences(TypeEntry entry, Document
doc,
> > >                                       boolean literal) {
> > >   @@ -3333,11 +3337,11 @@
> > >        /**
> > >         * Set the isReferenced flag to true on the given
MessageEntry
> > and
> > > all
> > >         * SymTabEntries that it refers to.
> > >   -     *
> > >   -     * @param entry
> > >   -     * @param def
> > >   -     * @param doc
> > >   -     * @param literal
> > >   +     *
> > >   +     * @param entry
> > >   +     * @param def
> > >   +     * @param doc
> > >   +     * @param literal
> > >         */
> > >        private void setMessageReferences(MessageEntry entry,
> > Definition
> > > def,
> > >                                          Document doc, boolean
> > literal) {
> > >   @@ -3388,11 +3392,11 @@
> > >        /**
> > >         * Set the isReferenced flag to true on the given
PortTypeEntry
> > and
> > > all
> > >         * SymTabEntries that it refers to.
> > >   -     *
> > >   -     * @param entry
> > >   -     * @param bEntry
> > >   -     * @param def
> > >   -     * @param doc
> > >   +     *
> > >   +     * @param entry
> > >   +     * @param bEntry
> > >   +     * @param def
> > >   +     * @param doc
> > >         */
> > >        private void setPortTypeReferences(PortTypeEntry entry,
> > >                                           BindingEntry bEntry,
> > Definition
> > > def,
> > >   @@ -3482,10 +3486,10 @@
> > >        /**
> > >         * Set the isReferenced flag to true on the given
BindingEntry
> > and
> > > all
> > >         * SymTabEntries that it refers to ONLY if this binding is
a
> > SOAP
> > > binding.
> > >   -     *
> > >   -     * @param entry
> > >   -     * @param def
> > >   -     * @param doc
> > >   +     *
> > >   +     * @param entry
> > >   +     * @param def
> > >   +     * @param doc
> > >         */
> > >        private void setBindingReferences(BindingEntry entry,
> > Definition
> > > def,
> > >                                          Document doc) {
> > >   @@ -3523,10 +3527,10 @@
> > >        /**
> > >         * Set the isReferenced flag to true on the given
ServiceEntry
> > and
> > > all
> > >         * SymTabEntries that it refers to.
> > >   -     *
> > >   -     * @param entry
> > >   -     * @param def
> > >   -     * @param doc
> > >   +     *
> > >   +     * @param entry
> > >   +     * @param def
> > >   +     * @param doc
> > >         */
> > >        private void setServiceReferences(ServiceEntry entry,
> > Definition
> > > def,
> > >                                          Document doc) {
> > >   @@ -3568,9 +3572,9 @@
> > >
> > >        /**
> > >         * Put the given SymTabEntry into the symbol table, if
> > appropriate.
> > >   -     *
> > >   -     * @param entry
> > >   -     * @throws IOException
> > >   +     *
> > >   +     * @param entry
> > >   +     * @throws IOException
> > >         */
> > >        private SymTabEntry symbolTablePut(SymTabEntry entry)
throws
> > > IOException {
> > >
> > >   @@ -3674,7 +3678,7 @@
> > >        /**
> > >         * checks whether there exists a WSDL port with a given
name in
> > the
> > > current
> > >         * symbol table
> > >   -     *
> > >   +     *
> > >         * @param name the QName of the port. Note: only the local
part
> > of
> > > the qname is relevant,
> > >         *             since port names are not qualified with a
> > namespace.
> > > They are of type nmtoken in WSDL 1.1
> > >         *             and of type ncname in WSDL 1.2
> > >   @@ -3703,17 +3707,17 @@
> > >
> > >        /**
> > >         * Method getInnerCollectionComponentQName
> > >   -     *
> > >   -     * @param node
> > >   -     * @return
> > >   +     *
> > >   +     * @param node
> > >   +     * @return
> > >         */
> > >   -    private static QName getInnerCollectionComponentQName(Node
> > node) {
> > >   +    private QName getInnerCollectionComponentQName(Node node) {
> > >
> > >            if (node == null) {
> > >                return null;
> > >            }
> > >
> > >   -        QName name =
SchemaUtils.getCollectionComponentQName(node,
> > new
> > > QNameHolder());
> > >   +        QName name =
SchemaUtils.getCollectionComponentQName(node,
> > new
> > > QNameHolder(), new BooleanHolder(), this);
> > >
> > >            if (name != null) {
> > >                return name;
> > >
> > >
> > >
> >
> 
> 
> --
> Davanum Srinivas -http://blogs.cocoondev.org/dims/

Mime
View raw message