You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2004/04/25 06:01:00 UTC
cvs commit: ws-axis/java/src/org/apache/axis/wsdl/toJava JavaBuildFileWriter.java
sanjiva 2004/04/24 21:01:00
Modified: java/src/org/apache/axis/wsdl/toJava
JavaBuildFileWriter.java
Log:
fixed problems with build.xml not getting named correctly
Revision Changes Path
1.7 +11 -1 ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaBuildFileWriter.java
Index: JavaBuildFileWriter.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaBuildFileWriter.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- JavaBuildFileWriter.java 8 Apr 2004 13:09:06 -0000 1.6
+++ JavaBuildFileWriter.java 25 Apr 2004 04:01:00 -0000 1.7
@@ -64,6 +64,9 @@
protected String getFileName() {
String dir = emitter.getOutputDir();
+ if (dir == null) {
+ dir = ".";
+ }
return dir + "/build.xml";
}
@@ -127,7 +130,14 @@
if ((index = wsdlFile.lastIndexOf("/")) > 0) {
wsdlFile = wsdlFile.substring(index + 1);
}
- return wsdlFile.substring(0, wsdlFile.indexOf('.'));
+ if ((index = wsdlFile.lastIndexOf("?")) > 0) {
+ wsdlFile = wsdlFile.substring(0, index);
+ }
+ if ((index = wsdlFile.indexOf('.')) != -1) {
+ return wsdlFile.substring(0, index);
+ } else {
+ return wsdlFile;
+ }
}
/* (non-Javadoc)