[Axis2] WSDL2C boolean not handled correctly - code does not compile
--------------------------------------------------------------------

                 Key: AXIS2C-541
                 URL: https://issues.apache.org/jira/browse/AXIS2C-541
             Project: Axis2-C
          Issue Type: Bug
          Components: code generation
    Affects Versions: Current (Nightly)
         Environment: Windows XP, Visual Studio 2003 C++
            Reporter: Dave Meier
            Priority: Blocker
             Fix For: Current (Nightly)


I have a boolean type in my WSDL and code is generated that fails to compile. 

WSDL: 

<?xml version="1.0" encoding="UTF-8"?> 
<definitions name="test" 
 targetNamespace="http://localhost:80/gsoap/test.wsdl"; 
 xmlns:tns="http://localhost:80/gsoap/test.wsdl"; 
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
 xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"; 
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 
 xmlns:ds="http://www.w3.org/2000/09/xmldsig#"; 
 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 
 xmlns:tt="urn:test" 
 xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"; 
 xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/"; 
 xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/"; 
 xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/"; 
 xmlns="http://schemas.xmlsoap.org/wsdl/";> 

<types> 

 <schema targetNamespace="urn:test" 
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
  xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"; 
  
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 
  xmlns:ds="http://www.w3.org/2000/09/xmldsig#"; 
  
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 
  xmlns:tt="urn:test" 
  xmlns="http://www.w3.org/2001/XMLSchema"; 
  elementFormDefault="qualified" 
  attributeFormDefault="qualified"> 
  <import namespace="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
  <import 
namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
 
  <import namespace="http://www.w3.org/2000/09/xmldsig#"/> 
  <import 
namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
 
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> 
  <simpleType name="Attachment-Access-Type"> 
   <restriction base="xsd:string"> 
    <enumeration value="ATTACHACCESS-DEFAULT"/> 
    <enumeration value="ATTACHACCESS-RESTRICTED"/> 
    <enumeration value="ATTACHACCESS-UNRESTRICTED"/> 
   </restriction> 
  </simpleType> 
  <!-- operation request element --> 
  <element name="SetAccess"> 
   <complexType> 
    <sequence> 
     <element name="activeInactive" type="xsd:boolean" minOccurs="1" 
maxOccurs="1"/> 
    </sequence> 
   </complexType> 
  </element> 
  <!-- operation response element --> 
  <element name="SetAccessResponse"> 
   <complexType> 
    <sequence> 
    </sequence> 
   </complexType> 
  </element> 
 </schema> 

</types> 

<message name="SetAccess"> 
 <part name="parameters" element="tt:SetAccess"/> 
</message> 

<message name="SetAccessResponse"> 
 <part name="parameters" element="tt:SetAccessResponse"/> 
</message> 

<portType name="testPortType"> 
 <operation name="SetAccess"> 
  <documentation>SetAccess</documentation> 
  <input message="tns:SetAccess"/> 
  <output message="tns:SetAccessResponse"/> 
 </operation> 
</portType> 

<binding name="test" type="tns:testPortType"> 
 <SOAP:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/> 
 <operation name="SetAccess"> 
  <SOAP:operation soapAction=""/> 
  <input> 
     <SOAP:body parts="parameters" use="literal"/> 
  </input> 
  <output> 
     <SOAP:body parts="parameters" use="literal"/> 
  </output> 
 </operation> 
</binding> 

<service name="test"> 
 <documentation>gSOAP 2.7.6e generated service definition</documentation> 
 <port name="test" binding="tns:test"> 
  <SOAP:address location="http://localhost:80/gsoap/gsoap_ssl.dll?test"/> 
 </port> 
</service> 

</definitions> 

Generated code: 

axis2_char_t text_value_1[64]; 

text_value_1 = (SetAccess->attrib_activeInactive)?"true":"false"; // Compile 
error on this line 

The text value should be assigned like: 
strcpy( text_value_1, (SetAccess->attrib_activeInactive)?"true":"false" ); 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to