axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@us.ibm.com>
Subject Re: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava Emitter.java
Date Fri, 21 Feb 2003 01:36:30 GMT
I would have prefered to talk about this one a bit more because I'm not 
sure which approach I prefer.  But, oh well.. fixed.

- James Snell
     IBM Emerging Technologies
     jasnell@us.ibm.com
     (559) 587-1233 (office)
     (700) 544-9035 (t/l)
     Programming Web Services With SOAP
         O'Reilly & Associates, ISBN 0596000952

     Have I not commanded you? Be strong and courageous. 
     Do not be terrified, do not be discouraged, for the Lord your 
     God will be with you whereever you go.    - Joshua 1:9



vidyanand@apache.org
02/20/2003 04:46 PM
Please respond to axis-dev


To
xml-axis-cvs@apache.org
cc

bcc

Subject
cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava Emitter.java



vidyanand    2003/02/20 16:46:21

Modified:    java/src/org/apache/axis/wsdl/gen Parser.java
java/src/org/apache/axis/wsdl/toJava Emitter.java
Log:
Bug Fix. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15779. Did what 
was proposed by Glen Daniels.

Revision  Changes    Path
1.15      +4 -0 xml-axis/java/src/org/apache/axis/wsdl/gen/Parser.java

Index: Parser.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/gen/Parser.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Parser.java 11 Dec 2002 22:38:28 -0000      1.14
+++ Parser.java 21 Feb 2003 00:46:21 -0000      1.15
@@ -274,7 +274,11 @@
generate(symbolTable);
} // run

+    protected void sanityCheck(SymbolTable symbolTable){
+        // do nothing.
+    }
private void generate(SymbolTable symbolTable) throws IOException {
+        sanityCheck(symbolTable);
Definition def = symbolTable.getDefinition();
genFactory.generatorPass(def, symbolTable);
if (isDebug()) {



1.58      +24 -0 
xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java

Index: Emitter.java
===================================================================
RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- Emitter.java        25 Jan 2003 21:57:47 -0000      1.57
+++ Emitter.java        21 Feb 2003 00:46:21 -0000      1.58
@@ -64,6 +64,8 @@
import org.apache.axis.wsdl.gen.GeneratorFactory;
import org.apache.axis.wsdl.gen.Parser;
import org.apache.axis.wsdl.symbolTable.BaseTypeMapping;
+import org.apache.axis.wsdl.symbolTable.SymbolTable;
+import org.apache.axis.wsdl.symbolTable.SymTabEntry;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;

@@ -78,6 +80,8 @@
import java.util.HashMap;
import java.util.List;
import java.util.Properties;
+import java.util.Vector;
+import java.util.Iterator;

/**
* This class produces java files for stubs, skeletons, and types from a
@@ -420,6 +424,26 @@
}
} // setup

+
+    protected void sanityCheck(SymbolTable symbolTable) {
+        Iterator it = symbolTable.getHashMap().values().iterator();
+        while (it.hasNext()) {
+            Vector v = (Vector) it.next();
+            for (int i = 0; i < v.size(); ++i) {
+                SymTabEntry entry = (SymTabEntry) v.elementAt(i);
+                String namespace = entry.getQName().getNamespaceURI();
+                String packageName =
+ org.apache.axis.wsdl.toJava.Utils.makePackageName(namespace);
+                String localName = entry.getQName().getLocalPart();
+                if (localName.equals(packageName) &&
+ packageName.equals(namespaces.getCreate(namespace))) {
+                    packageName += "_pkg";
+                    namespaces.put(namespace, packageName);
+                }
+
+            }
+        }
+    }

/**
* Tries to load the namespace-to-package mapping file.





Mime
View raw message