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 2001/11/02 14:11:23 UTC
cvs commit: xml-axis/java/src/org/apache/axis/encoding Deserializer.java
butek 01/11/02 05:11:23
Modified: java/src/org/apache/axis/encoding Deserializer.java
Log:
Fix for nil serialization bug.
Submitted by Richard Scheuerle.
Revision Changes Path
1.19 +12 -0 xml-axis/java/src/org/apache/axis/encoding/Deserializer.java
Index: Deserializer.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/Deserializer.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Deserializer.java 2001/10/30 16:46:37 1.18
+++ Deserializer.java 2001/11/02 13:11:23 1.19
@@ -55,6 +55,8 @@
package org.apache.axis.encoding;
+import org.apache.axis.Constants;
+
import org.apache.axis.message.EnvelopeHandler;
import org.apache.axis.message.MessageElement;
import org.apache.axis.message.SAX2EventRecorder;
@@ -296,6 +298,16 @@
DeserializationContext context)
throws SAXException
{
+ // If the xsi:nil attribute, set the value to null and return since
+ // there is nothing to deserialize.
+ String nil = null;
+ for (int i = 0; i < Constants.URIS_SCHEMA_XSI.length && nil == null; i++)
+ nil = attributes.getValue(Constants.URIS_SCHEMA_XSI[i], "nil");
+ if (nil != null && nil.equals("true")) {
+ value = null;
+ return;
+ }
+
String href = attributes.getValue("href");
if (href != null) {
isHref = true;