You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by pr...@apache.org on 2005/02/15 17:59:29 UTC
cvs commit: ws-axis/c/src/engine/client ClientAxisEngine.cpp
prestonf 2005/02/15 08:59:29
Modified: c/src/engine/client ClientAxisEngine.cpp
Log:
Hi All,
I think this will complete what needs to be done for AXISCPP-417.
Regards,
Fred Preston.
Revision Changes Path
1.25 +33 -19 ws-axis/c/src/engine/client/ClientAxisEngine.cpp
Index: ClientAxisEngine.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/engine/client/ClientAxisEngine.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- ClientAxisEngine.cpp 7 Jan 2005 15:21:07 -0000 1.24
+++ ClientAxisEngine.cpp 15 Feb 2005 16:59:29 -0000 1.25
@@ -64,27 +64,41 @@
do
{
+// Get the service name that was specified in the second parameter of the call
+// to setTransportProperty( SOAPACTION_HEADER , "") matches a service name in
+// the 'service' part of the WSDD file then call that service now.
const char* pchService = pSoap->getServiceName();
- if (pchService == NULL || strchr(pchService,'#') == NULL)
- {
- pService = g_pWSDDDeployment->getService (pchService);
- }
- else
- {
- char * pchTempService = new char [strlen(pchService)+1];
- // Skip the starting double quote
- strcpy(pchTempService, pchService+1);
-
- /* The String returned as the service name has the format "Calculator#add".
- So null terminate string at #. */
- *(strchr(pchTempService, '#')) = '\0';
-
- /* get service description object from the WSDD Deployment object */
- pService = g_pWSDDDeployment->getService (pchTempService);
- delete [] pchTempService; // Samisa: should delete the whole array
- }
-
+// Check that there is a valid service name.
+ if( pchService != NULL)
+ {
+// The convention for the service name appears to be service#port
+ if( strchr( pchService, '#') == NULL)
+ {
+// If there is no # seperator, then strip off the outer quotes.
+ int iStringLength = strlen( pchService);
+ char * pszService = new char[iStringLength];
+
+ memset( pszService, 0, iStringLength);
+ memcpy( pszService, pchService + 1, iStringLength - 2);
+
+ pService = g_pWSDDDeployment->getService( pszService);
+ }
+ else
+ {
+ char * pchTempService = new char [strlen(pchService)+1];
+// Skip the starting double quote
+ strcpy(pchTempService, pchService+1);
+
+// The String returned as the service name has the format "Calculator#add".
+// So null terminate string at #.
+ *(strchr(pchTempService, '#')) = '\0';
+
+// get service description object from the WSDD Deployment object
+ pService = g_pWSDDDeployment->getService (pchTempService);
+ delete [] pchTempService; // Samisa: should delete the whole array
+ }
+ }
//Get Global and Transport Handlers
Status = initializeHandlers (sSessionId, pSoap->getProtocol());