stevel      2002/06/27 15:54:55

  Modified:    java/src/org/apache/axis/wsdl/fromJava Types.java
  Log:
  costin's null patch with some bracing round clauses thrown in.
  
  Revision  Changes    Path
  1.37      +10 -4     xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
  
  Index: Types.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Types.java        20 Jun 2002 20:35:47 -0000      1.36
  +++ Types.java        27 Jun 2002 22:54:55 -0000      1.37
  @@ -3,7 +3,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -146,21 +146,27 @@
        * @return the QName of the generated Schema type, null if void
        */
       public QName writePartType(Class type, javax.xml.namespace.QName qname) throws 
Exception {
  -        if (type.getName().equals("void"))
  +        if( type==null ) {
  +            return null;
  +        }
  +        if (type.getName().equals("void")) {
             return null;
  +        }
           if (isSimpleType(type)) {
               javax.xml.namespace.QName typeQName = getTypeQName(type);
               // Still need to write any element declaration...
               if (qname != null) {
                   String elementType = writeType(type);
                   Element element = createElementDecl(qname, elementType, false);
  -                if (element != null)
  +                if (element != null) {
                       writeSchemaElement(qname,element);
  +                }
               }
               return typeQName;
           }else {
  -            if (wsdlTypesElem == null)
  +            if (wsdlTypesElem == null) {
                   writeWsdlTypesElement();
  +            }
               return writeTypeAsElement(type, qname);
           }
       }
  
  
  


Reply via email to