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 di...@apache.org on 2004/06/11 14:31:01 UTC
cvs commit: ws-axis/java/src/org/apache/axis/wsdl/fromJava Emitter.java Types.java
dims 2004/06/11 05:31:01
Modified: java/src/org/apache/axis/encoding/ser ArraySerializer.java
java/src/org/apache/axis/wsdl/fromJava Emitter.java
Types.java
Log:
Fix for TCK Failure. WSDL generated for a simple RPC/LIT operation with a string array (see below) was incorrect (the generated WSDL had soapenc:Array)
Command Line:
org.apache.axis.wsdl.Java2WSDL -o abc.wsdl -l"http://localhost:8080/axis/services/ABCService" ABC -u LITERAL -y RPC"
Class:
public interface ABC extends Remote{
public String [] m1() throws RemoteException;
public String m2(String [] array) throws RemoteException;
}
Revision Changes Path
1.55 +3 -0 ws-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java
Index: ArraySerializer.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/ArraySerializer.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- ArraySerializer.java 27 Feb 2004 17:07:23 -0000 1.54
+++ ArraySerializer.java 11 Jun 2004 12:31:00 -0000 1.55
@@ -19,6 +19,7 @@
import org.apache.axis.AxisEngine;
import org.apache.axis.Constants;
import org.apache.axis.MessageContext;
+import org.apache.axis.enum.Use;
import org.apache.axis.components.logger.LogFactory;
import org.apache.axis.encoding.SerializationContext;
import org.apache.axis.encoding.Serializer;
@@ -403,6 +404,8 @@
MessageContext mc = MessageContext.getCurrentContext();
if (mc != null) {
encoded = mc.isEncoded();
+ } else {
+ encoded = types.getServiceDesc().getUse() == Use.ENCODED;
}
if (!encoded) {
1.123 +1 -0 ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
Index: Emitter.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- Emitter.java 2 Jun 2004 18:06:25 -0000 1.122
+++ Emitter.java 11 Jun 2004 12:31:00 -0000 1.123
@@ -573,6 +573,7 @@
serviceDesc.setAllowedMethods(allowedMethods);
javaServiceDesc.setDisallowedMethods(disallowedMethods);
serviceDesc.setStyle(style);
+ serviceDesc.setUse(use);
// If the class passed in is a portType,
// there may be an implClass that is used to
1.95 +9 -1 ws-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
Index: Types.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- Types.java 3 Jun 2004 14:01:33 -0000 1.94
+++ Types.java 11 Jun 2004 12:31:01 -0000 1.95
@@ -109,7 +109,7 @@
List beanCompatErrs = new ArrayList();
/** Field serviceDesc */
- ServiceDesc serviceDesc = null;
+ private ServiceDesc serviceDesc = null;
/** Keep track of the element QNames we've written to avoid dups */
private Set writtenElementQNames = new HashSet();
@@ -1776,5 +1776,13 @@
}
return true;
+ }
+
+ /**
+ * return the service description
+ * @return
+ */
+ public ServiceDesc getServiceDesc() {
+ return serviceDesc;
}
}