You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by aj...@apache.org on 2006/09/20 11:07:16 UTC

svn commit: r448130 - /incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl

Author: ajborley
Date: Wed Sep 20 02:07:16 2006
New Revision: 448130

URL: http://svn.apache.org/viewvc?view=rev&rev=448130
Log:
Generated wrapper classes now set the Operation object return value if necessary. This re-enables ws.binding services.

Modified:
    incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl

Modified: incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl?view=diff&rev=448130&r1=448129&r2=448130
==============================================================================
--- incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl (original)
+++ incubator/tuscany/cpp/sca/tools/scagen/src/org/apache/tuscany/sca/cpp/tools/services/xsl/SCA4CPPIntfWrapperCPP.xsl Wed Sep 20 02:07:16 2006
@@ -241,8 +241,18 @@
         <xsl:text>
         operation.setReturnValue(&amp;ret);</xsl:text>
         </xsl:when>
-        <xsl:otherwise><!-- simple type -->
-            <xsl:text>        *(</xsl:text><xsl:value-of select="$type"/><xsl:text>*)operation.getReturnValue() = </xsl:text><xsl:call-template name="impl_arrow_op_brackets_and_parms"/><xsl:text>;</xsl:text>
+        <xsl:otherwise><!-- simple type -->            
+            <xsl:text>
+        if(operation.getReturnValue() != NULL)
+        {
+            *(</xsl:text><xsl:value-of select="$type"/><xsl:text>*)operation.getReturnValue() = </xsl:text><xsl:call-template name="impl_arrow_op_brackets_and_parms"/><xsl:text>;
+        }
+        else
+        {
+            </xsl:text><xsl:value-of select="$type"/><xsl:text>* ret = new </xsl:text><xsl:value-of select="$type"/><xsl:text>;
+            *ret = </xsl:text><xsl:call-template name="impl_arrow_op_brackets_and_parms"/><xsl:text>;
+            operation.setReturnValue((const </xsl:text><xsl:value-of select="$type"/><xsl:text>*)ret);
+        }</xsl:text>
         </xsl:otherwise>
     </xsl:choose>
 </xsl:template>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org