rubys 01/08/01 05:56:05
Modified: java/samples/interop DeploymentDescriptor.xml
EchoTestClient.java EchoTestService.java
Log:
Add the popular echoMap service
Revision Changes Path
1.8 +4 -1 xml-soap/java/samples/interop/DeploymentDescriptor.xml
Index: DeploymentDescriptor.xml
===================================================================
RCS file: /home/cvs/xml-soap/java/samples/interop/DeploymentDescriptor.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DeploymentDescriptor.xml 2001/07/08 15:19:25 1.7
+++ DeploymentDescriptor.xml 2001/08/01 12:56:05 1.8
@@ -3,7 +3,7 @@
checkMustUnderstands="true">
<isd:provider type="java"
scope="Application"
- methods="nop echoInteger echoString echoFloat echoStruct
echoIntegerArray echoFloatArray echoStringArray echoStructArray echoVoid echoBase64
echoDate echoDecimal echoBoolean">
+ methods="nop echoInteger echoString echoFloat echoStruct
echoIntegerArray echoFloatArray echoStringArray echoStructArray echoVoid echoBase64
echoDate echoDecimal echoBoolean echoMap">
<isd:java class="samples.interop.EchoTestService" static="false"/>
</isd:provider>
@@ -54,5 +54,8 @@
<isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="" qname="x:inputBoolean"
xml2JavaClassName="org.apache.soap.encoding.soapenc.BooleanDeserializer"/>
+ <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:x="" qname="x:inputMap"
+
xml2JavaClassName="org.apache.soap.encoding.soapenc.HashtableSerializer"/>
</isd:mappings>
</isd:service>
1.11 +6 -0 xml-soap/java/samples/interop/EchoTestClient.java
Index: EchoTestClient.java
===================================================================
RCS file: /home/cvs/xml-soap/java/samples/interop/EchoTestClient.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- EchoTestClient.java 2001/07/12 16:50:43 1.10
+++ EchoTestClient.java 2001/08/01 12:56:05 1.11
@@ -68,6 +68,7 @@
import org.apache.soap.util.*;
import java.lang.reflect.*;
import java.util.Date;
+import java.util.Hashtable;
import java.math.BigDecimal;
/** A quick-and-dirty client for the Interop echo test services as defined
@@ -208,6 +209,11 @@
smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "return"), null, null,
booleanSer);
doCall(url, "echoBoolean", p);
+ Hashtable map = new Hashtable();
+ map.put("stringKey", new Integer(5));
+ map.put(new Date(), "string value");
+ p = new Parameter("inputMap", Hashtable.class, map, null);
+ doCall(url, "echoMap", p);
}
public void doCall(URL url, String methodName, Parameter param)
1.4 +6 -0 xml-soap/java/samples/interop/EchoTestService.java
Index: EchoTestService.java
===================================================================
RCS file: /home/cvs/xml-soap/java/samples/interop/EchoTestService.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- EchoTestService.java 2001/07/07 13:41:55 1.3
+++ EchoTestService.java 2001/08/01 12:56:05 1.4
@@ -57,6 +57,7 @@
import java.math.BigDecimal;
import java.util.Date;
+import java.util.Hashtable;
/** An implementation of the interop echo service as defined at
* http://www.xmethods.net/ilab.
@@ -131,5 +132,10 @@
public boolean echoBoolean(boolean b)
{
return b;
+ }
+
+ public Hashtable echoMap(Hashtable map)
+ {
+ return map;
}
}