tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r449433 - in /incubator/tuscany/cpp/sca/runtime/extensions/ws: reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp
Date Sun, 24 Sep 2006 16:42:20 GMT
Author: jsdelfino
Date: Sun Sep 24 09:42:19 2006
New Revision: 449433

URL: http://svn.apache.org/viewvc?view=rev&rev=449433
Log:
Fixed parameter names generated by Axis2Client when there is no WSDL. Changed to use strings
instead of char* to carry string parameters in Axis2Client and Axis2Service.

Modified:
    incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp?view=diff&rev=449433&r1=449432&r2=449433
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
(original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
Sun Sep 24 09:42:19 2006
@@ -43,6 +43,8 @@
 #include "tuscany/sca/model/WSDLInterface.h"
 #include "tuscany/sca/model/WSDLOperation.h"
 
+#include <sstream>
+
 using namespace tuscany::sca::ws;
 
 
@@ -297,8 +299,9 @@
                              */
                             for (int i=0; i<operation.getNParms(); i++)
                             {
-                                string pname = "param" + (i+1);
-                                DataObjectList& l = inputDataObject->getList(pname);
+                                ostringstream pname;
+                                pname << "param" << (i+1);
+                                DataObjectList& l = inputDataObject->getList(pname.str());
                                 
                                 Operation::Parameter& parm = operation.getParameter(i);
                                 switch(parm.getType())
@@ -600,10 +603,8 @@
                         break;
                     case Type::StringType:
                         {
-                            const char** stringData = new const char*; 
                             string* str = new string(outputDataObject->getCString(pl[i]));
-                            *stringData = str->c_str();
-                            operation.setReturnValue(stringData);
+                            operation.setReturnValue(str);
                         }
                         break;
                     case Type::DataObjectType:
@@ -642,9 +643,7 @@
                                         // Return a text element        
                                         if (sequence->isText(0))
                                         {                                        
-                                            const char** stringData = new const char*; 
-                                            *stringData = sequence->getCStringValue(0);
-
+                                            string* stringData = new string(sequence->getCStringValue(0));
                                             operation.setReturnValue(stringData);
                                         }
                                         else
@@ -662,9 +661,7 @@
                                     {
                                         // Empty content, add an empty string
                                         LOGINFO(4, "SDO OpenDataObject return value was empy");
-                                        const char** stringData = new const char*; 
-                                        *stringData = "";
-
+                                        string *stringData = new string(""); 
                                         operation.setReturnValue(stringData);
                                     }
                                 }

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp?view=diff&rev=449433&r1=449432&r2=449433
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp
(original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp
Sun Sep 24 09:42:19 2006
@@ -216,8 +216,7 @@
                                 break;
                             case Type::StringType:
                                 {
-                                    const char** stringData = new const char*; 
-                                    *stringData = inputDataObject->getCString(pl[i]);
+                                    string* stringData = new string(inputDataObject->getCString(pl[i]));
                                     operation.addParameter(stringData);
                                 }
                                 break;
@@ -261,9 +260,7 @@
                                                 // Add a text element        
                                                 if (sequence->isText(0))
                                                 {                                       

-                                                    const char** stringData = new const char*;

-                                                    *stringData = sequence->getCStringValue(0);
-        
+                                                    string* stringData = new string(sequence->getCStringValue(0));
                                                     operation.addParameter(stringData);
                                                 }
                                                 else
@@ -281,9 +278,7 @@
                                             {
                                                 // Empty content, add an empty string
                                                 LOGINFO_2(4, "SDO OpenDataObject parameter
named %s[%d] was empty", name, j);
-                                                const char** stringData = new const char*;

-                                                *stringData = "";
-    
+                                                string* stringData = new string(""); 
                                                 operation.addParameter(stringData);
                                             }
                                         }                       



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


Mime
View raw message