axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ryan" <Michael.R...@stellent.com>
Subject Error in serialization of boolean fields
Date Mon, 25 Nov 2002 17:26:07 GMT
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
mryan@stellent.com



Mime
View raw message