tomj        02/02/21 12:02:20

  Modified:    java/src/org/apache/axis/wsdl/toJava SymbolTable.java
               java/src/org/apache/axis/utils resources.properties
  Log:
  Fix problems in the WSDL2Java symbol table routine that creates a type element
  for the attribute.  Reject non-simple types (for now) since we don't handle them.
  
  Put error text string in message file (oops).
  
  Revision  Changes    Path
  1.35      +13 -4     xml-axis/java/src/org/apache/axis/wsdl/toJava/SymbolTable.java
  
  Index: SymbolTable.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/SymbolTable.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- SymbolTable.java  21 Feb 2002 18:51:23 -0000      1.34
  +++ SymbolTable.java  21 Feb 2002 20:02:20 -0000      1.35
  @@ -568,20 +568,29 @@
                   this.dotNet = false;
                   // Create symbol table entry for attribute type
                   QName refQName = Utils.getNodeTypeRefQName(node, "type");
  -                if (refQName == null) {
  +                if (refQName != null) {
                       TypeEntry refType = getTypeEntry(refQName, false);
  -                    if (refType != null) {
  +                    if (refType == null) {
                           // Not defined yet, add one
  +                        // XXX This check is too basic, we need to handle
  +                        // XXX <simpleType> types also.
  +                        // XXX <simpleType> types also.
                           String baseName = btm.getBaseName(refQName);
                           if (baseName != null) {
                               BaseType bt = new BaseType(refQName);
  -                            bt.setIsReferenced(true);
                               symbolTablePut(bt);
                           }
                           else {
                               throw new IOException(
  -                                    "Attribute type is not simple:" + 
refQName.toString());
  +                                    JavaUtils.getMessage("AttrNotSimpleType01",
  +                                                         refQName.toString()));
                           }
  +                    } else {
  +                        // found a type entry, make sure we mark it referenced
  +                        // XXX This isn't usefull assumming we only support base
  +                        // XXX schema types (int, string), but in the future we
  +                        // XXX need to support <simpleTypes> as attributes.
  +                        refType.setIsReferenced(true);
                       }
                   }
                   
  
  
  
  1.58      +1 -0      xml-axis/java/src/org/apache/axis/utils/resources.properties
  
  Index: resources.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/resources.properties,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- resources.properties      21 Feb 2002 18:51:23 -0000      1.57
  +++ resources.properties      21 Feb 2002 20:02:20 -0000      1.58
  @@ -644,6 +644,7 @@
   literalTypePart00=Error: Message part {0} of operation or fault {1} is specified as 
a type and the soap:body use of binding "{2}" is literal.  This WSDL is not currently 
supported.
   BadServiceName00=Error: Empty or missing service name
   AttrNotSimpleType00=Bean attribute {0} is of type {1}, which is not a simple type
  +AttrNotSimpleType01=Error: attribute is of type {1}, which is not a simple type
   NoSerializer00=Unable to find serializer for type {0}
   
   
  
  
  


Reply via email to