ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ven...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/wsdl/symbolTable SymbolTable.java Utils.java SchemaUtils.java
Date Fri, 04 Mar 2005 08:43:52 GMT
venkat      2005/03/04 00:43:52

  Modified:    java/src/org/apache/axis/wsdl/symbolTable SymbolTable.java
                        Utils.java SchemaUtils.java
  Log:
  Checking in the patch from Hans for AXIS-66 (xsd:list support). The changes are hand-merged
since the patch is not in valid format.
  
  Also i have ran both JAX-RPC and SAAJ TCK and ensured that all tests ran green.
  
  -- venkat
  
  Revision  Changes    Path
  1.114     +5 -0      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.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- SymbolTable.java	8 Feb 2005 18:44:35 -0000	1.113
  +++ SymbolTable.java	4 Mar 2005 08:43:52 -0000	1.114
  @@ -954,6 +954,11 @@
                       createTypeFromRef(re);
                   }
   
  +                Node list = SchemaUtils.getListNode(node);
  +                if (list != null && Utils.getAttribute(list,"itemType") != null)
{
  +                    createTypeFromRef(list);
  +                }
  +
                   Node union = SchemaUtils.getUnionNode(node);
                   if (union != null) {
                       QName [] memberTypes = Utils.getMemberTypeQNames(union);
  
  
  
  1.44      +7 -1      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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Utils.java	3 Feb 2005 11:05:52 -0000	1.43
  +++ Utils.java	4 Mar 2005 08:43:52 -0000	1.44
  @@ -302,13 +302,19 @@
               // a ref can be for an element or attributeGroup
               if ((localName != null)
                   && !(localName.equals("attributeGroup") ||
  -                     localName.equals("group"))) {
  +                        localName.equals("group") ||
  +                        localName.equals("list"))) {
                   forElement.value = true;
               }
   
               qName = getTypeQNameFromAttr(node, "ref");
           }
   
  +        // in case of a list get the itemType
  +        if (qName == null) {
  +            qName = getTypeQNameFromAttr(node, "itemType");
  +        }
  +
           // If the node has "type"/"ref" and "maxOccurs" then the type is really
           // a collection.  There is no qname in the wsdl which we can use to represent
           // the collection, so we need to invent one.
  
  
  
  1.52      +25 -0     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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- SchemaUtils.java	25 Jan 2005 04:06:28 -0000	1.51
  +++ SchemaUtils.java	4 Mar 2005 08:43:52 -0000	1.52
  @@ -84,6 +84,21 @@
           return null;
       }
       
  +    public static Node getListNode(Node node) {
  +        // Expecting a schema simpleType 
  +        if (isXSDNode(node, "simpleType")) {
  +            // Under the simpleType there could be list
  +            NodeList children = node.getChildNodes();
  +            for (int j = 0; j < children.getLength(); j++) {
  +                Node kid = children.item(j);
  +                if (isXSDNode(kid, "list")) {
  +                    return kid;
  +                }
  +            }
  +        }
  +        return null;
  +    }
  +
       public static boolean isSimpleTypeWithUnion(Node node) {
           return (getUnionNode(node) != null);
       }
  @@ -1924,6 +1939,16 @@
                       (org.w3c.dom.Element) listNode;
                       String type = listElement.getAttribute("itemType");
                       if (type.equals("")) {
  +                        Node localType = null;
  +                        children = listNode.getChildNodes();
  +                        for (j = 0; j < children.getLength() && localType ==
null; j++) {
  +                            if (isXSDNode(children.item(j), "simpleType")) {
  +                                localType = children.item(j);
  +                            }
  +                        }
  +                        if (localType != null) {
  +                            return getSimpleTypeBase(localType);
  +                        }
                           return null;
                       }
                       //int colonIndex = type.lastIndexOf(":");
  
  
  

Mime
View raw message