tomj        2003/08/11 14:25:28

  Modified:    java/src/org/apache/axis/wsdl/symbolTable ElementDecl.java
                        SchemaUtils.java
  Log:
  Patch from [EMAIL PROTECTED] (C�dric Chabanois):
    Add nilable property to ElementDecl object
  
  Bug 22100.
  
  Revision  Changes    Path
  1.5       +10 -0     
xml-axis/java/src/org/apache/axis/wsdl/symbolTable/ElementDecl.java
  
  Index: ElementDecl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/ElementDecl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ElementDecl.java  22 Apr 2003 19:36:14 -0000      1.4
  +++ ElementDecl.java  11 Aug 2003 21:25:28 -0000      1.5
  @@ -74,6 +74,8 @@
       // causes nil=true to be passed over the wire.
       private boolean minOccursIs0=false;   
   
  +    private boolean nillable=false;
  +
       // Indicate if the ElementDecl represents
       // an xsd:any element
       private boolean anyElement = false;
  @@ -108,6 +110,14 @@
   
       public void setMinOccursIs0(boolean minOccursIs0) {
           this.minOccursIs0 = minOccursIs0;
  +    }
  +
  +    public void setNillable(boolean nillable) {
  +        this.nillable = nillable;
  +    }
  +
  +    public boolean getNillable() {
  +        return nillable;
       }
   
       public boolean getAnyElement() {
  
  
  
  1.26      +4 -2      
xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SchemaUtils.java
  
  Index: SchemaUtils.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/symbolTable/SchemaUtils.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- SchemaUtils.java  31 Jul 2003 06:25:18 -0000      1.25
  +++ SchemaUtils.java  11 Aug 2003 21:25:28 -0000      1.26
  @@ -55,6 +55,7 @@
   package org.apache.axis.wsdl.symbolTable;
   
   import org.apache.axis.Constants;
  +import org.apache.axis.utils.JavaUtils;
   import org.w3c.dom.Node;
   import org.w3c.dom.NodeList;
   
  @@ -369,6 +370,9 @@
               if (minOccurs != null && minOccurs.equals("0")) {
                   elem.setMinOccursIs0(true);
               }
  +            
  +            
elem.setNillable(JavaUtils.isTrueExplicitly(Utils.getAttribute(elementNode,"nillable")));
  +            
               return elem;
           }
           
  @@ -626,7 +630,6 @@
           }
   
           // If the node kind is an element, dive into it.
  -        QName nodeKind = Utils.getNodeQName(node);
           if (isXSDNode(node, "element")) {
               NodeList children = node.getChildNodes();
               for (int j = 0; j < children.getLength(); j++) {
  @@ -690,7 +693,6 @@
           // If the node kind is an element, dive into it.
           if (isXSDNode(node, "element")) {
               NodeList children = node.getChildNodes();
  -            Node node2 = null;
               for (int j = 0; j < children.getLength(); j++) {
                   Node n = children.item(j);
                   if (isXSDNode(n, "simpleType") || isXSDNode(n, "complexType") || 
isXSDNode(n, "simpleContent")) {
  
  
  

Reply via email to