You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-c-dev@ws.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2010/07/12 20:24:51 UTC

[jira] Moved: (AXIS2C-1487) ADB generates code that won't compile on Visual C Compiler

     [ https://issues.apache.org/jira/browse/AXIS2C-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen moved AXIS2-4770 to AXIS2C-1487:
------------------------------------------------

              Project: Axis2-C  (was: Axis2)
                  Key: AXIS2C-1487  (was: AXIS2-4770)
    Affects Version/s:     (was: nightly)
          Component/s:     (was: adb)

> ADB generates code that won't compile on Visual C Compiler
> ----------------------------------------------------------
>
>                 Key: AXIS2C-1487
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1487
>             Project: Axis2-C
>          Issue Type: Bug
>         Environment: Win32: Visual Studio 2008 Professional / Visual Studio 2008 Express
>            Reporter: Mirko Wischer
>            Priority: Trivial
>
> ADB generates "C" code with variable declaration after method call in block:
> For Example:
> .....
> else
> {
>    axiom_node_t *text_node = NULL;
>    axiom_node_get_first_child(parent, env);
>    axiom_text_t *text_element = NULL;
> ....
> This won't compile using VC Compiler.
> The XSLT creating this code is CADBBeamTemplateSource.xsl. Look at the following lines (starting at line: 789)
>  <xsl:when test="@simple and (count(property)!=0 or count(itemtype)!=0)">
>             
>             status = AXIS2_FAILURE;
>             if(parent)
>             {
>                 axis2_char_t *attrib_text = NULL;
>                 attrib_text = axiom_element_get_attribute_value_by_name(axiom_node_get_data_element(parent, env), env, "nil");
>                 if (attrib_text != NULL &amp;&amp; !axutil_strcasecmp(attrib_text, "true"))
>                 {
>                   <xsl:choose>
>                    <xsl:when test="not(@nillable)">
>                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL value is set to a non nillable element <xsl:value-of select="$originalName"/>");
>                     status = AXIS2_FAILURE;
>                    </xsl:when>
>                    <xsl:otherwise>
>                     status = <xsl:value-of select="$axis2_name"/>_set<xsl:value-of select="$name"/>_nil(<xsl:value-of select="$name"/>, env);
>                    </xsl:otherwise>
>                   </xsl:choose>
>                 }
>                 else
>                 {
>                     axiom_node_t *text_node = NULL;
>                     axiom_node_get_first_child(parent, env);
>                     axiom_text_t *text_element = NULL;
>                     if (text_node &amp;&amp;
>                             axiom_node_get_node_type(text_node, env) == AXIOM_TEXT)
>                         text_element = (axiom_text_t*)axiom_node_get_data_element(text_node, env);
>                     text_value = "";
>                     if(text_element &amp;&amp; axiom_text_get_value(text_element, env))
>                     {
>                         text_value = (axis2_char_t*)axiom_text_get_value(text_element, env);
>                     }
>                     status = <xsl:value-of select="$axis2_name"/>_deserialize_from_string(<xsl:value-of select="$name"/>, env, text_value, parent);
>                 }
>             }
>             </xsl:when>
> I added a combinded patch file for this and for AXIS2-4225

-- 
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: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org