You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Amit Tewari <am...@yahoo.com> on 2009/10/14 11:52:41 UTC
Compilation issue with generated code (xsd:enumeration elements)
I am trying to generate C code (adb binding) from a WSDL which defines following among other things and then use visual studio 2008 to compile it.
1. SimpleTypes involving enumeration like
<xsd:simpleType name="ANY_NAME">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ANYVALUE1"/>
<xsd:enumeration value="ANYVALUE2"/>
</xsd:restriction>
</xsd:simpleType>
When I try to compile generated code the adb_*.c for all the types involving enums ( as described above)
fail to compile. All the enum types fail on one single line ( in each respective file)
axiom_text_t *text_element = NULL; // 'axiom_text_t' : illegal use of this type as an expression
I
think its probably because axiom_text_t is defined in the middle of
the function instead of in the beginning as C rules require.
I do need keep enums in the wsdl. Any help would be appreciated .
Amit
Re: Compilation issue with generated code (xsd:enumeration elements)
Posted by Selvaratnam Uthaiyashankar <ut...@gmail.com>.
Hi,
It is a bug in codegeneration module. We have to define all variables at the
beginning of the method.
Created an issue AXIS2C-1403. Will fix it.
Regards,
Shankar
On Wed, Oct 14, 2009 at 3:22 PM, Amit Tewari <am...@yahoo.com> wrote:
>
> I am trying to generate C code (adb binding) from a WSDL which defines
> following among other things and then use visual studio 2008 to compile
> it.
>
> 1. SimpleTypes involving enumeration like
> <xsd:simpleType name="ANY_NAME">
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="ANYVALUE1"/>
> <xsd:enumeration value="ANYVALUE2"/>
> </xsd:restriction>
> </xsd:simpleType>
>
>
> When I try to compile generated code the adb_*.c for all the types
> involving enums ( as described above) fail to compile. All the enum types
> fail on one single line ( in each respective file)
>
> axiom_text_t *text_element = NULL; // 'axiom_text_t' : illegal use of
> this type as an expression
> I think its probably because axiom_text_t is defined in the middle of the
> function instead of in the beginning as C rules require.
>
> I do need keep enums in the wsdl. Any help would be appreciated .
>
> Amit
--
S.Uthaiyashankar
Software Architect
WSO2 Inc.
http://wso2.com/ - "The Open Source SOA Company"