You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ia...@apache.org on 2004/11/25 13:12:13 UTC

cvs commit: ws-axis/contrib/j2me/rpc/src/tool/org/apache/axis/j2me/rpc/wsdl/tojava J2meBeanWriter.java

ias         2004/11/25 04:12:13

  Modified:    contrib/j2me/rpc/src/tool/org/apache/axis/j2me/rpc/wsdl/tojava
                        J2meBeanWriter.java
  Log:
  Update to follow the new naming policy of Axis Java.
  
  Revision  Changes    Path
  1.2       +8 -14     ws-axis/contrib/j2me/rpc/src/tool/org/apache/axis/j2me/rpc/wsdl/tojava/J2meBeanWriter.java
  
  Index: J2meBeanWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/contrib/j2me/rpc/src/tool/org/apache/axis/j2me/rpc/wsdl/tojava/J2meBeanWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- J2meBeanWriter.java	26 Dec 2003 13:51:42 -0000	1.1
  +++ J2meBeanWriter.java	25 Nov 2004 12:12:13 -0000	1.2
  @@ -57,6 +57,7 @@
   import org.apache.axis.Constants;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.axis.utils.Messages;
  +import org.apache.axis.wsdl.symbolTable.ContainedAttribute;
   import org.apache.axis.wsdl.symbolTable.ElementDecl;
   import org.apache.axis.wsdl.symbolTable.SchemaUtils;
   import org.apache.axis.wsdl.symbolTable.TypeEntry;
  @@ -256,8 +257,7 @@
                       variableName = Constants.ANYCONTENT;
                       isAny = true;
                   } else {
  -                    String elemName = Utils.getLastLocalPart(elem.getName().getLocalPart());
  -                    variableName = Utils.xmlNameToJava(elemName);
  +                    variableName = elem.getName();
                   }
   
                   names.add(typeName);
  @@ -281,13 +281,10 @@
   
           // Add attribute names
           if (attributes != null) {
  -            for (int i = 0; i < attributes.size(); i += 2) {
  -                TypeEntry attr = (TypeEntry) attributes.get(i);
  -                String typeName = attr.getName();
  -                QName xmlName = (QName) attributes.get(i + 1);
  -                String attrName = Utils.getLastLocalPart(xmlName.getLocalPart());
  -                String variableName =
  -                        Utils.xmlNameToJava(attrName);
  +            for (int i = 0; i < attributes.size(); i++) {
  +                ContainedAttribute attr = (ContainedAttribute) attributes.get(i);
  +                String typeName = attr.getType().getName(); 
  +                String variableName = attr.getName();
   
                   names.add(typeName);
                   names.add(variableName);
  @@ -301,7 +298,7 @@
                   // bug 19069: need to generate code that access member variables that
                   // are enum types through the class interface, not the constructor
                   // this util method returns non-null if the type at node is an enum
  -                if (null != Utils.getEnumerationBaseAndValues(attr.getNode(),
  +                if (null != Utils.getEnumerationBaseAndValues(attr.getType().getNode(),
                           emitter.getSymbolTable())) {
                       enumerationTypes.add(typeName);
                   }
  @@ -479,11 +476,8 @@
               if (elements != null) {
                   for (int j = 0; j < elements.size(); j++) {
                       ElementDecl elem = (ElementDecl) elements.get(j);
  -                    String name = Utils.getLastLocalPart(elem.getName().getLocalPart());
                       paramTypes.add(elem.getType().getName());
  -                    paramNames.add(
  -                            mangle
  -                            + Utils.xmlNameToJava(name));
  +                    paramNames.add(elem.getName());
                   }
               }
           }