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 bu...@apache.org on 2002/09/26 15:58:01 UTC
cvs commit: xml-axis/java/test/wsdl/wrapped_inout WrappedInOutTestCase.java
butek 2002/09/26 06:58:01
Modified: java/src/org/apache/axis/encoding/ser
SimpleDeserializer.java
java/test/wsdl/wrapped_inout WrappedInOutTestCase.java
Log:
I fixed a TCK bug. The empty string - "" - was serialized as
<name></name>
which is correct, but it was deserialized as null.
I've added a test to test/wsdl/wrapped_inout to cover this scenario.
Revision Changes Path
1.28 +1 -1 xml-axis/java/src/org/apache/axis/encoding/ser/SimpleDeserializer.java
Index: SimpleDeserializer.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/SimpleDeserializer.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- SimpleDeserializer.java 19 Sep 2002 20:17:35 -0000 1.27
+++ SimpleDeserializer.java 26 Sep 2002 13:58:01 -0000 1.28
@@ -207,7 +207,7 @@
DeserializationContext context)
throws SAXException
{
- if (isNil || val == null || val.length() == 0) {
+ if (isNil || val == null) {
value = null;
return;
}
1.2 +18 -0 xml-axis/java/test/wsdl/wrapped_inout/WrappedInOutTestCase.java
Index: WrappedInOutTestCase.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/wrapped_inout/WrappedInOutTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- WrappedInOutTestCase.java 24 Sep 2002 20:19:57 -0000 1.1
+++ WrappedInOutTestCase.java 26 Sep 2002 13:58:01 -0000 1.2
@@ -29,6 +29,24 @@
assertEquals(value, expected);
}
+ public void test1WrappedInOutEchoEmptyString() throws Exception {
+ test.wsdl.wrapped_inout.WrappedInOutInterface binding;
+ try {
+ binding = new test.wsdl.wrapped_inout.WrappedInOutLocator().getWrappedInOut();
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertTrue("binding is null", binding != null);
+
+ java.lang.String expected = new String("");
+ java.lang.String value = null;
+ value = binding.echoString(expected);
+ assertEquals(value, expected);
+ }
+
public void test2WrappedInOutEchoStringIO() throws Exception {
test.wsdl.wrapped_inout.WrappedInOutInterface binding;
try {