axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18287] New: - Error in serialization of xsd:boolean fields
Date Mon, 24 Mar 2003 18:47:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18287>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18287

Error in serialization of xsd:boolean fields

           Summary: Error in serialization of xsd:boolean fields
           Product: Axis
           Version: 1.1rc2
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: mryan@stellent.com


Fields defined as being of typew xsd:boolean in complex types in WSDL are 
generated as soapenc:boolean values in Java code, when using WSDL2Java.  This 
results in incompatibilities between different SOAP implementations of the the 
same WSDL.  An Axis client will choke on SOAP genereated by some other server. 

Below is a WSDL that duplicates the problem.  Below that is the command line 
used to generate the Java.  Below that is the static block from the Java class 
that shows the resulting error.

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:tns="http://www.outsideinsdk.com/transformation_server/transform/1/0/" 
xmlns:ta="http://www.outsideinsdk.com/transformation_server/agent/1/0/" 
xmlns:ts="http://www.outsideinsdk.com/transformation_server/transform/1/0/" 
xmlns:tss="http://www.outsideinsdk.com/transformation_server/startup/1/0/" 
name="transform" 
targetNamespace="http://www.outsideinsdk.com/transformation_server/transform/1/0
/">

<types>
 
 <schema xmlns="http://www.w3.org/2001/XMLSchema" 
targetNamespace="http://www.outsideinsdk.com/transformation_server/transform/1/0
/">

  <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>

  <complexType name="FontChangeResponse">
   <sequence>
    <element name="result" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
   </sequence>
  </complexType>

 </schema>
 
</types>

<message name="FontChangeRequest">
 <part name="font" type="ts:FontFlags"/>
</message>

<message name="FontChangeResponse">
 <part name="result" type="xsd:unsignedInt"/>
</message>

<portType name="FontChangePortType">
 <operation name="FontChange">
  <documentation>Service definition of function ts__Transform</documentation>
  <input message="tns:FontChangeRequest"/>
  <output message="tns:FontChangeResponse"/>
 </operation>
</portType>

<binding name="fontChangeBinding" type="tns:FontChangePortType">
 <SOAP:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
 <operation name="FontChange">
  <SOAP:operation 
soapAction="http://www.outsideinsdk.com/transformation_server/transform/1/0/#Tra
nsform"/>
  <input>
   <SOAP:body use="encoded" 
namespace="http://www.outsideinsdk.com/transformation_server/transform/1/0/" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  </input>
  <output>
   <SOAP:body use="encoded" 
namespace="http://www.outsideinsdk.com/transformation_server/transform/1/0/" 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  </output>
 </operation>
</binding>

<service name="fontChange">
 <documentation>Font Change Test Case</documentation>
 <port name="fontChangePort" binding="tns:fontChangeBinding">
  <SOAP:address 
location="http://www.outsideinsdk.com/transformation_server/transform.cgi"/>
 </port>
</service>

</definitions>


Command target used in Ant:
<java classname="org.apache.axis.wsdl.WSDL2Java" fork="true">
	<arg line="--verbose --all --fileNStoPkg ${axisNStoPkg.properties} --
output ${axisstub.src} ${axiswsdl}"/>
	<classpath refid="axisclasspath"/>
</java>


Resulting Static block:
    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName
("http://www.outsideinsdk.com/transformation_server/transform/1/0/", "FontFlags"
));
        org.apache.axis.description.ElementDesc elemField = new 
org.apache.axis.description.ElementDesc();
        elemField.setFieldName("suppressSize");
        elemField.setXmlName(new javax.xml.namespace.QName("", "suppressSize"));
        elemField.setXmlType(new javax.xml.namespace.QName
("http://schemas.xmlsoap.org/soap/encoding/", "boolean"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("suppressColor");
        elemField.setXmlName(new javax.xml.namespace.QName
("", "suppressColor"));
        elemField.setXmlType(new javax.xml.namespace.QName
("http://schemas.xmlsoap.org/soap/encoding/", "boolean"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("suppressFace");
        elemField.setXmlName(new javax.xml.namespace.QName("", "suppressFace"));
        elemField.setXmlType(new javax.xml.namespace.QName
("http://schemas.xmlsoap.org/soap/encoding/", "boolean"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
    }

Mime
View raw message