butek 02/02/14 06:59:31
Modified: java/src/org/apache/axis/wsdl/toJava BindingEntry.java
JavaImplWriter.java JavaInterfaceWriter.java
JavaSkelWriter.java JavaStubWriter.java
JavaTestCaseWriter.java JavaWriterFactory.java
SymbolTable.java
Log:
Overloaded operation work:
1. (this commit) fix WSDL2Java
2. get WSDL4J fix
3. fix runtime
4. fix Java2WSDL
Revision Changes Path
1.4 +2 -2 xml-axis/java/src/org/apache/axis/wsdl/toJava/BindingEntry.java
Index: BindingEntry.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/BindingEntry.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BindingEntry.java 1 Feb 2002 18:04:08 -0000 1.3
+++ BindingEntry.java 14 Feb 2002 14:59:31 -0000 1.4
@@ -107,8 +107,8 @@
/**
* Get the Parameters object for the given operation.
*/
- public Parameters getParameters(String operationName) {
- return (Parameters) parameters.get(operationName);
+ public Parameters getParameters(Operation operation) {
+ return (Parameters) parameters.get(operation);
} // getParameters
/**
1.11 +1 -1
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaImplWriter.java
Index: JavaImplWriter.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaImplWriter.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- JavaImplWriter.java 1 Feb 2002 18:04:08 -0000 1.10
+++ JavaImplWriter.java 14 Feb 2002 14:59:31 -0000 1.11
@@ -125,7 +125,7 @@
Operation ptOperation = operation.getOperation();
OperationType type = ptOperation.getStyle();
Parameters parameters =
- bEntry.getParameters(operation.getOperation().getName());
+ bEntry.getParameters(operation.getOperation());
// These operation types are not supported. The signature
// will be a string stating that fact.
1.6 +1 -1
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaInterfaceWriter.java
Index: JavaInterfaceWriter.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaInterfaceWriter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JavaInterfaceWriter.java 1 Feb 2002 18:04:08 -0000 1.5
+++ JavaInterfaceWriter.java 14 Feb 2002 14:59:31 -0000 1.6
@@ -129,7 +129,7 @@
*/
private void writeOperation(Operation operation) throws IOException {
writeComment(pw, operation.getDocumentationElement());
- Parameters parms = bEntry.getParameters(operation.getName());
+ Parameters parms = bEntry.getParameters(operation);
pw.println(parms.signature + ";");
} // writeOperation
1.12 +2 -2
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java
Index: JavaSkelWriter.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSkelWriter.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- JavaSkelWriter.java 1 Feb 2002 18:04:08 -0000 1.11
+++ JavaSkelWriter.java 14 Feb 2002 14:59:31 -0000 1.12
@@ -154,7 +154,7 @@
for (int i = 0; i < operations.size(); ++i) {
BindingOperation operation = (BindingOperation) operations.get(i);
Parameters parameters =
- bEntry.getParameters(operation.getOperation().getName());
+ bEntry.getParameters(operation.getOperation());
if (parameters != null) {
// The invoked java name of the operation is stored.
@@ -180,7 +180,7 @@
for (int i = 0; i < operations.size(); ++i) {
BindingOperation operation = (BindingOperation) operations.get(i);
Parameters parameters =
- bEntry.getParameters(operation.getOperation().getName());
+ bEntry.getParameters(operation.getOperation());
// Get the soapAction from the <soap:operation>
String soapAction = "";
1.30 +2 -2
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
Index: JavaStubWriter.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- JavaStubWriter.java 8 Feb 2002 22:25:55 -0000 1.29
+++ JavaStubWriter.java 14 Feb 2002 14:59:31 -0000 1.30
@@ -223,7 +223,7 @@
for (int i = 0; i < operations.size(); ++i) {
BindingOperation operation = (BindingOperation) operations.get(i);
Parameters parameters =
- bEntry.getParameters(operation.getOperation().getName());
+ bEntry.getParameters(operation.getOperation());
// Get the soapAction from the <soap:operation>
String soapAction = "";
@@ -324,7 +324,7 @@
HashSet types = new HashSet();
Vector v = new Vector();
- Parameters params = bEntry.getParameters(operation.getName());
+ Parameters params = bEntry.getParameters(operation);
// Loop over parameter types for this operation
for (int i=0; i < params.list.size(); i++) {
1.16 +8 -2
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java
Index: JavaTestCaseWriter.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- JavaTestCaseWriter.java 5 Feb 2002 16:22:40 -0000 1.15
+++ JavaTestCaseWriter.java 14 Feb 2002 14:59:31 -0000 1.16
@@ -145,6 +145,12 @@
pw.close();
} // finish
+ // Methods may be overloaded. If we just grab the method name
+ // for the test method names, we could end up with duplicates.
+ // The quick-and-easy solution is to have a test counter so that
+ // each test method has a number.
+ private int counter = 1;
+
private final void writeServiceTestCode(
String portName, PortType portType, PortTypeEntry ptEntry,
Binding binding, BindingEntry bEntry) throws IOException {
@@ -152,7 +158,7 @@
while (ops.hasNext()) {
Operation op = (Operation) ops.next();
OperationType type = op.getStyle();
- Parameters params = bEntry.getParameters(op.getName());
+ Parameters params = bEntry.getParameters(op);
// These operation types are not supported. The signature
// will be a string stating that fact.
@@ -163,7 +169,7 @@
}
String javaOpName = Utils.xmlNameToJavaClass(op.getName());
- String testMethodName = "test" + portName + javaOpName;
+ String testMethodName = "test" + counter++ + portName + javaOpName;
pw.println(" public void " + testMethodName + "() {");
// If there is not literal use, the interface name is the portType name.
1.14 +1 -1
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriterFactory.java
Index: JavaWriterFactory.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaWriterFactory.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- JavaWriterFactory.java 8 Feb 2002 23:18:53 -0000 1.13
+++ JavaWriterFactory.java 14 Feb 2002 14:59:31 -0000 1.14
@@ -420,7 +420,7 @@
Operation operation = (Operation) operations.next();
OperationType type = operation.getStyle();
String name = operation.getName();
- Parameters parameters = bEntry.getParameters(name);
+ Parameters parameters = bEntry.getParameters(operation);
if (type == OperationType.SOLICIT_RESPONSE) {
parameters.signature = " // " + JavaUtils.getMessage(
"invalidSolResp00", name);
1.31 +1 -1 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.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- SymbolTable.java 13 Feb 2002 21:07:15 -0000 1.30
+++ SymbolTable.java 14 Feb 2002 14:59:31 -0000 1.31
@@ -795,7 +795,7 @@
Parameters parms = getOperationParameters(operation,
namespace,
bEntry);
- parameters.put(operation.getName(), parms);
+ parameters.put(operation, parms);
}
bEntry.setParameters(parameters);
}