How often do you change the service?  If it's not often, then why generate
every build?  We do something similar here, but since the services
themselves change very rarely, we only generate when we've made a change.
Otherwise, we use the same classes.  Could this work for you?

Kevin

-----Original Message-----
From: Michael Ryan [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 3:41 PM
To: [EMAIL PROTECTED]
Subject: RE: Error in serialization of boolean fields


Yes, hand editing to use the correct namespace works just fine, but
unfortunately is not an adequate work-around.  

These classes are generated as part of our build process to
automatically account for any changes in the WSDL.  We cannot stop the
build, edit the classes by hand, and then continue the build.

-----Original Message-----
From: Davis, Kevin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2003 2:36 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Error in serialization of boolean fields


I know this may sound silly, but have you tried editing the generated
classes to but in the namespace you are expecting?

field.setXmlType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema".";,
boolean"));

Kevin
-----Original Message-----
From: Michael Ryan [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 3:32 PM
To: [EMAIL PROTECTED]
Subject: FW: Error in serialization of boolean fields


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