You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/11/21 04:26:08 UTC
svn commit: r477485 -
/incubator/tuscany/cpp/sca/runtime/extensions/rest/reference/curl/src/tuscany/sca/rest/RESTServiceWrapper.cpp
Author: jsdelfino
Date: Mon Nov 20 19:26:07 2006
New Revision: 477485
URL: http://svn.apache.org/viewvc?view=rev&rev=477485
Log:
Minor code cleanup. Added more info to exception message.
Modified:
incubator/tuscany/cpp/sca/runtime/extensions/rest/reference/curl/src/tuscany/sca/rest/RESTServiceWrapper.cpp
Modified: incubator/tuscany/cpp/sca/runtime/extensions/rest/reference/curl/src/tuscany/sca/rest/RESTServiceWrapper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/rest/reference/curl/src/tuscany/sca/rest/RESTServiceWrapper.cpp?view=diff&rev=477485&r1=477484&r2=477485
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/rest/reference/curl/src/tuscany/sca/rest/RESTServiceWrapper.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/rest/reference/curl/src/tuscany/sca/rest/RESTServiceWrapper.cpp Mon Nov 20 19:26:07 2006
@@ -136,7 +136,7 @@
// Build the request URL
string uri = binding->getURI();
ostringstream os;
- if (uri[uri.length()-1]=='?')
+ if (uri[uri.length()-1] == '?')
{
// Add the parameters to the end of the URL in the form
// param=value&
@@ -164,10 +164,10 @@
string url = os.str();
curl_easy_setopt(curl_handle, CURLOPT_URL, url.c_str());
- // Send all data to this function */
+ // Send all data to this function
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_callback);
- // Pass our 'chunk' struct to the callback function */
+ // Pass our 'chunk' struct to the callback function
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
// Perform the HTTP get
@@ -475,8 +475,10 @@
}
default:
{
- throwException(ServiceDataException, "Unsupported parameter type");
- }
+ ostringstream msg;
+ msg << "Unsupported parameter type: " << parm.getType();
+ throwException(ServiceDataException, msg.str().c_str());
+ }
}
}
@@ -502,7 +504,6 @@
if(!outputBodyDataObject)
{
logerror("Could not convert received document to SDO");
- /** TODO: return a fault here */
return;
}
@@ -560,7 +561,6 @@
{
bytesData[len] = 0;
}
- //printf("outputDataObject has BytesType named %s with length %d\n", name, bytesWritten);
operation.setReturnValue(&bytesData);
}
break;
@@ -623,7 +623,6 @@
* This code deals with xsd:any element parameters
* Get each element as a DataObject and add in to the parameter list
*/
-
DataObjectList& dataObjectList = outputDataObject->getList(pl[i]);
for(int j=0; j<dataObjectList.size(); j++)
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org