rubys 02/02/27 15:09:15
Modified: java build.xml
java/src/org/apache/axis/wsdl WSDL2Java.java
java/src/org/apache/axis/wsdl/toJava Emitter.java
java/test/wsdl Wsdl2javaAntTask.java
java/test/wsdl/interop3/import1 NStoPkg.properties
Log:
Allow properties files to be in the local directory
Revision Changes Path
1.115 +7 -0 xml-axis/java/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-axis/java/build.xml,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- build.xml 27 Feb 2002 17:10:56 -0000 1.114
+++ build.xml 27 Feb 2002 23:09:15 -0000 1.115
@@ -516,6 +516,13 @@
</target>
<!-- =================================================================== -->
+ <!-- Interop 3 -->
+ <!-- =================================================================== -->
+ <target name="interop3" depends="buildTest">
+ <ant dir="test/wsdl/interop3/import1"/>
+ </target>
+
+ <!-- =================================================================== -->
<!-- Cleans everything -->
<!-- =================================================================== -->
<target name="clean">
1.8 +8 -0 xml-axis/java/src/org/apache/axis/wsdl/WSDL2Java.java
Index: WSDL2Java.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/WSDL2Java.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- WSDL2Java.java 20 Feb 2002 17:17:36 -0000 1.7
+++ WSDL2Java.java 27 Feb 2002 23:09:15 -0000 1.8
@@ -73,6 +73,7 @@
import org.w3c.dom.Document;
+import java.io.File;
import java.io.IOException;
import java.util.HashMap;
@@ -335,6 +336,13 @@
*/
public byte getScope() {
return emitter.getScope();
+ } // getScope
+
+ /**
+ * Get the scope for the deploy.xml file.
+ */
+ public void setNStoPkg(File NStoPkg) {
+ emitter.setNStoPkg(NStoPkg);
} // getScope
//
1.20 +16 -5 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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Emitter.java 20 Feb 2002 17:17:36 -0000 1.19
+++ Emitter.java 27 Feb 2002 23:09:15 -0000 1.20
@@ -74,6 +74,7 @@
import javax.wsdl.xml.WSDLReader;
import java.io.File;
+import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
@@ -82,7 +83,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.ResourceBundle;
+import java.util.Properties;
import java.util.Vector;
import javax.wsdl.QName;
@@ -123,6 +124,7 @@
protected WriterFactory writerFactory = null;
protected SymbolTable symbolTable = null;
protected String currentWSDLURI = null;
+ protected File NStoPkg = new File("NStoPkg.properties");
/**
* Default constructor.
@@ -238,15 +240,17 @@
* Look for a NStoPkg.properties file in the CLASSPATH. If it exists,
* then collect the namespace->package mappings from it.
*/
- private static void getNStoPkgFromPropsFile(HashMap namespaces)
+ private void getNStoPkgFromPropsFile(HashMap namespaces)
{
try {
- ResourceBundle mappings = ResourceBundle.getBundle("NStoPkg");
- Enumeration keys = mappings.getKeys();
+ Properties mappings = new Properties();
+ mappings.load(new FileInputStream(NStoPkg));
+ Enumeration keys = mappings.propertyNames();
while (keys.hasMoreElements()) {
try {
String key = (String) keys.nextElement();
- namespaces.put(key, mappings.getString(key));
+System.out.println(key + " => " + mappings.getProperty(key));
+ namespaces.put(key, mappings.getProperty(key));
}
catch (Throwable t) {
}
@@ -409,6 +413,13 @@
*/
public byte getScope() {
return scope;
+ } // getScope
+
+ /**
+ * set the package to namespace mappings
+ */
+ public void setNStoPkg(File NStoPkg) {
+ this.NStoPkg = NStoPkg;
} // getScope
///////////////////////////////////////////////////
1.20 +1 -0 xml-axis/java/test/wsdl/Wsdl2javaAntTask.java
Index: Wsdl2javaAntTask.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaAntTask.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Wsdl2javaAntTask.java 27 Feb 2002 20:38:44 -0000 1.19
+++ Wsdl2javaAntTask.java 27 Feb 2002 23:09:15 -0000 1.20
@@ -129,6 +129,7 @@
emitter.generateSkeleton(skeleton);
emitter.verbose(verbose);
emitter.setTypeMappingVersion(tm);
+ emitter.setNStoPkg(project.resolveFile("NStoPkg.properties"));
Document doc;
1.2 +1 -1 xml-axis/java/test/wsdl/interop3/import1/NStoPkg.properties
Index: NStoPkg.properties
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/interop3/import1/NStoPkg.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NStoPkg.properties 27 Feb 2002 22:13:53 -0000 1.1
+++ NStoPkg.properties 27 Feb 2002 23:09:15 -0000 1.2
@@ -1,2 +1,2 @@
-http\://soapinterop.org/main/=test.wsdl.interop3.import1
+http\://soapinterop.org/=test.wsdl.interop3.import1
http\://soapinterop.org/definitions/=test.wsdl.interop3.import1.definitions