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 sa...@apache.org on 2005/05/25 12:08:04 UTC
cvs commit: ws-axis/c/src/transport/axis3 HTTPTransport.cpp
samisa 2005/05/25 03:08:04
Modified: c/src/transport/axis3 HTTPTransport.cpp
Log:
Added connection opening logic to openConnection method and removed that from flushOutput and made flushOutput call openConnection
Revision Changes Path
1.28 +19 -22 ws-axis/c/src/transport/axis3/HTTPTransport.cpp
Index: HTTPTransport.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/transport/axis3/HTTPTransport.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- HTTPTransport.cpp 23 May 2005 18:21:48 -0000 1.27
+++ HTTPTransport.cpp 25 May 2005 10:08:03 -0000 1.28
@@ -223,11 +223,24 @@
int HTTPTransport::openConnection()
{
- // Samisa : opening the connection is really done in flushOutput method
- // hence it is not reqquired to do that in here, and makes the trasport
- // relatively faster
- // Fix for AXISCPP-481
- return AXIS_SUCCESS;
+ if( m_bReopenConnection)
+ {
+ m_bReopenConnection = false;
+
+ if( m_pActiveChannel->open() != AXIS_SUCCESS)
+ {
+ int iStringLength = m_pActiveChannel->GetLastErrorMsg().length() + 1;
+ const char * pszLastError = new char[iStringLength];
+
+ memcpy( (void *) pszLastError,
+ m_pActiveChannel->GetLastErrorMsg().c_str(),
+ iStringLength);
+
+ throw HTTPTransportException( CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED,
+ (char *) pszLastError);
+ }
+ }
+ return AXIS_SUCCESS;
}
/*
@@ -260,23 +273,7 @@
*/
AXIS_TRANSPORT_STATUS HTTPTransport::flushOutput() throw (AxisException, HTTPTransportException)
{
- if( m_bReopenConnection)
- {
- m_bReopenConnection = false;
-
- if( m_pActiveChannel->open() != AXIS_SUCCESS)
- {
- int iStringLength = m_pActiveChannel->GetLastErrorMsg().length() + 1;
- const char * pszLastError = new char[iStringLength];
-
- memcpy( (void *) pszLastError,
- m_pActiveChannel->GetLastErrorMsg().c_str(),
- iStringLength);
-
- throw HTTPTransportException( CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED,
- (char *) pszLastError);
- }
- }
+ this->openConnection();
// In preperation for sending the message, calculate the size of the message
// by using the string length method.