You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by sn...@apache.org on 2002/11/27 03:39:57 UTC
cvs commit: xml-soap/java/samples/propertybag PropertyBagClient.java testit.cmd testit.sh
snichol 2002/11/26 18:39:56
Modified: java/samples/configure DeploymentDescriptor.xml
java/samples/propertybag PropertyBagClient.java testit.cmd
testit.sh
Log:
Add -9 and -0 options to PropertyBagClient to specify the use of 1999 or
2000 schemas.
Fix misspelling in configure deployment descriptor.
Revision Changes Path
1.2 +1 -1 xml-soap/java/samples/configure/DeploymentDescriptor.xml
Index: DeploymentDescriptor.xml
===================================================================
RCS file: /home/cvs/xml-soap/java/samples/configure/DeploymentDescriptor.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DeploymentDescriptor.xml 25 Jun 2002 05:16:27 -0000 1.1
+++ DeploymentDescriptor.xml 27 Nov 2002 02:39:56 -0000 1.2
@@ -5,7 +5,7 @@
methods="getConfigureParameters">
<isd:java class="samples.configure.ConfigureService"/>
<isd:option key="option1" value="you can configure your service"/>
- <isd:option key="option2" value="through your deployement descriptor"/>
+ <isd:option key="option2" value="through your deployment descriptor"/>
</isd:provider>
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>
1.2 +23 -8 xml-soap/java/samples/propertybag/PropertyBagClient.java
Index: PropertyBagClient.java
===================================================================
RCS file: /home/cvs/xml-soap/java/samples/propertybag/PropertyBagClient.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PropertyBagClient.java 16 Sep 2002 15:26:25 -0000 1.1
+++ PropertyBagClient.java 27 Nov 2002 02:39:56 -0000 1.2
@@ -79,15 +79,30 @@
* @author Scott Nichol (snichol@computer.org)
*/
public class PropertyBagClient {
- public static void main (String[] args) throws Exception {
- if (args.length != 1) {
- System.err.println ("Usage: java " + PropertyBagClient.class.getName() +
- " SOAP-router-URL");
- System.exit(1);
- }
+ private static void usage() {
+ System.err.println ("Usage: java " + PropertyBagClient.class.getName() +
+ " [-9|-0] SOAP-router-URL");
+ System.exit(1);
+ }
+ public static void main (String[] args) throws Exception {
// Process the arguments.
- URL url = new URL(args[0]);
+ URL url = null;
+ String schemaURI = null;
+ if (args.length == 1) {
+ url = new URL(args[0]);
+ schemaURI = Constants.NS_URI_2001_SCHEMA_XSD;
+ } else if (args.length == 2) {
+ if (args[0].equals("-9"))
+ schemaURI = Constants.NS_URI_1999_SCHEMA_XSD;
+ else if (args[0].equals("-0"))
+ schemaURI = Constants.NS_URI_2000_SCHEMA_XSD;
+ else
+ usage();
+ url = new URL(args[1]);
+ } else {
+ usage();
+ }
// Create the bag (something that looks like a "book bean"
Hashtable bag = new Hashtable(7);
@@ -101,7 +116,7 @@
// Create the mapping
PropertyBagSerializer ser = new PropertyBagSerializer();
- SOAPMappingRegistry smr = new SOAPMappingRegistry();
+ SOAPMappingRegistry smr = new SOAPMappingRegistry(null, schemaURI);
smr.mapTypes(Constants.NS_URI_SOAP_ENC,
new QName("urn:property-bag-sample", "PropertyBag"),
Map.class, ser, null);
1.2 +3 -0 xml-soap/java/samples/propertybag/testit.cmd
Index: testit.cmd
===================================================================
RCS file: /home/cvs/xml-soap/java/samples/propertybag/testit.cmd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- testit.cmd 16 Sep 2002 15:26:25 -0000 1.1
+++ testit.cmd 27 Nov 2002 02:39:56 -0000 1.2
@@ -9,6 +9,9 @@
echo Running the propertybag test
java samples.propertybag.PropertyBagClient http://localhost:8080/soap/servlet/rpcrouter
echo .
+echo Running the propertybag test with the 1999 schema
+java samples.propertybag.PropertyBagClient -9 http://localhost:8080/soap/servlet/rpcrouter
+echo .
echo Undeploy it now
java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter undeploy urn:property-bag-sample
echo .
1.2 +3 -1 xml-soap/java/samples/propertybag/testit.sh
Index: testit.sh
===================================================================
RCS file: /home/cvs/xml-soap/java/samples/propertybag/testit.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- testit.sh 16 Sep 2002 15:26:25 -0000 1.1
+++ testit.sh 27 Nov 2002 02:39:56 -0000 1.2
@@ -6,8 +6,10 @@
java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter list
echo
echo Running the propertybag test
-rm return.dat
java samples.propertybag.PropertyBagClient http://localhost:8080/soap/servlet/rpcrouter
+echo
+echo Running the propertybag test with the 1999 schema
+java samples.propertybag.PropertyBagClient -9 http://localhost:8080/soap/servlet/rpcrouter
echo
echo Undeploy it now
java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter undeploy urn:property-bag-sample