I sent the following email some four months ago (twice), and got no
response.  I recently downloaded the Axis 1.1 RC2 code, and tried again,
but the same exact thing happens.  Deserialization is impossible,
because the code is expecting a soapenc:boolean, but the server (NOT an
AXIS server) is returning the xsd:boolean (as explicitly stated in the
WSDL).

Has no one else run into this problem?  Does no one use the XML Schema
datatypes?  Is there any sort of workaround?


-----Original Message-----
From: Michael Ryan 
Sent: Monday, November 25, 2002 11:26 AM
To: [EMAIL PROTECTED]
Subject: Error in serialization of boolean fields


Hello all-
        Just started using the released version 1.0 of Axis.  I have
noticed that, for complex types, the generated classes are encoding
boolean fields as "soapenc:boolean" instead of as "xsd:boolean".  The
fields are defined in the WSDL as "xsd:boolean", but the static field
description blocks are using the wrong namespace.  

Here is a snippet of my WSDL:
<complexType name="FontFlags">
  <complexContent>
    <extension base="xsd:anyType">
      <sequence>
        <element name="suppressSize" type="xsd:boolean" minOccurs="0"
maxOccurs="1" /> 
        <element name="suppressColor" type="xsd:boolean" minOccurs="0"
maxOccurs="1" /> 
        <element name="suppressFace" type="xsd:boolean" minOccurs="0"
maxOccurs="1" /> 
      </sequence>
    </extension>
  </complexContent>
</complexType>

And here is the resulting static block from the FontFlags class:
    static {
        org.apache.axis.description.FieldDesc field = new
org.apache.axis.description.ElementDesc();
        field.setFieldName("suppressSize");
        field.setXmlName(new javax.xml.namespace.QName("",
"suppressSize"));
        field.setXmlType(new
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/";,
"boolean"));
        field.setMinOccursIs0(true);
        typeDesc.addFieldDesc(field);
        field = new org.apache.axis.description.ElementDesc();
        field.setFieldName("suppressColor");
        field.setXmlName(new javax.xml.namespace.QName("",
"suppressColor"));
        field.setXmlType(new
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/";,
"boolean"));
        field.setMinOccursIs0(true);
        typeDesc.addFieldDesc(field);
        field = new org.apache.axis.description.ElementDesc();
        field.setFieldName("suppressFace");
        field.setXmlName(new javax.xml.namespace.QName("",
"suppressFace"));
        field.setXmlType(new
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/";,
"boolean"));
        field.setMinOccursIs0(true);
        typeDesc.addFieldDesc(field);
    };

As you can see, the namespace for the boolean fields is
"http://schemas.xmlsoap.org/soap/encoding/";, when is should be
"http://www.w3.org/2001/XMLSchema";.

Has anyone else seen this issue, and is there currently a fix for it?

Michael J. Ryan
Principal Software Engineer
Stellent SCD (Software Components Division)
Chicago, IL
[EMAIL PROTECTED]


Reply via email to