You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2006/04/28 16:59:08 UTC
svn commit: r397914 - in /webservices/axis/trunk/c: ./ include/axis/
src/client/adminclient/ src/common/ src/engine/ src/server/adminservice/
src/server/simple_axis_server/
Author: dicka
Date: Fri Apr 28 07:59:05 2006
New Revision: 397914
URL: http://svn.apache.org/viewcvs?rev=397914&view=rev
Log:
Implement mechanism to allow AdminClient to stop the Axis Server.
Currently, only effective when using the SimpleAxisServer - but I'm sure others can extend it to other server implementations.
Modified:
webservices/axis/trunk/c/include/axis/Axis.hpp
webservices/axis/trunk/c/services.xml
webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp
webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp
webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h
webservices/axis/trunk/c/src/common/AdminUtils.cpp
webservices/axis/trunk/c/src/common/AdminUtils.h
webservices/axis/trunk/c/src/common/IAdminUtils.h
webservices/axis/trunk/c/src/engine/Axis.cpp
webservices/axis/trunk/c/src/server/adminservice/AxisAdmin.wsdl
webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.cpp
webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.hpp
webservices/axis/trunk/c/src/server/simple_axis_server/SimpleAxisServer.cpp
Modified: webservices/axis/trunk/c/include/axis/Axis.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/include/axis/Axis.hpp?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/include/axis/Axis.hpp (original)
+++ webservices/axis/trunk/c/include/axis/Axis.hpp Fri Apr 28 07:59:05 2006
@@ -76,6 +76,17 @@
* @param type The XSDTYPE of the storage item to be deleted.
*/
static void AxisDelete(void* pValue, XSDTYPE type);
+
+ /**
+ * Indicates if the Axis engine is running.
+ * This will return true after the first invocation of Axis::initialize()before
+ * the last invocation of Axis::terminate().
+ *
+ * @return Indicate if Axis engine is still running.
+ */
+ static bool isRunning();
+
+ static void stopAxis();
};
AXIS_CPP_NAMESPACE_END
Modified: webservices/axis/trunk/c/services.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/services.xml?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/services.xml (original)
+++ webservices/axis/trunk/c/services.xml Fri Apr 28 07:59:05 2006
@@ -446,5 +446,22 @@
</if>
</target>
+
+ <target name="stopAxisServer" depends="initialize">
+ <exec executable="${dir.release}/bin/${adminClientExecutableName}${executableSuffix}"
+ failifexecutionfails="true">
+ <arg line="localhost ${testPort} STOP" />
+ <env key="PATH"
+ path="${dir.libraries}${path.separator}${dir.xmlParser}${path.separator}${java.library.path}" />
+ <env key="LD_LIBRARY_PATH"
+ path="${dir.libraries}${path.separator}${dir.xmlParser}" />
+ <env key="LIBPATH"
+ path="${dir.libraries}${path.separator}${dir.xmlParser}" />
+ <env key="SHLIB_PATH"
+ path="${dir.libraries}${path.separator}${dir.xmlParser}" />
+ <env key="AXISCPP_DEPLOY" value="${dir.test.generated}/AdminClient" />
+ </exec>
+ </target>
+
</project>
Modified: webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp (original)
+++ webservices/axis/trunk/c/src/client/adminclient/AdminClient.cpp Fri Apr 28 07:59:05 2006
@@ -35,6 +35,7 @@
if( argc < 4)
{
printf( "Usage: %s <server> <port> <wsdd file>\n", argv[0]);
+ printf( "Usage: %s <server> <port> STOP\n", argv[0]);
exit( 1);
}
@@ -42,69 +43,79 @@
Uri += ":";
Uri += argv[2];
Uri += "/axis/AxisAdmin";
- wsdd = argv[3];
- FILE * file = fopen( wsdd.c_str(), "r");
-
- if (NULL == file)
- {
- printf( "WSDD file %s cannot be opened\n", wsdd.c_str ());
- printf( "Usage: %s <server> <port> <wsdd file>\n", argv[0]);
- exit( 1);
- }
-
- wsdd = "";
-
- while( !done)
+ try
{
- len = fread( Buff, 1, FILEBUFFSIZE - 1, file);
-
- Buff[len] = 0;
-
- if( ferror( file))
- {
- fclose( file);
-
- printf( "WSDD file %s cannot be read\n", wsdd.c_str());
- printf( "Usage: %s <server> <port> <wsdd file>\n", argv[0]);
- exit( 1);
- }
-
- done = feof( file);
-
- wsdd += Buff;
- }
-
- fclose( file);
-
- try
- {
- axiscpp::AxisAdminService ws( Uri.c_str());
- axiscpp::xsd__base64Binary v;
-
- v.set( (axiscpp::xsd__unsignedByte *) wsdd.c_str(), wsdd.length());
-
- if( axiscpp::true_ == ws.updateWSDD( v))
+ axiscpp::AxisAdminService ws( Uri.c_str());
+ if ( 0 == strcmp(argv[3], "STOP") )
{
- printf( "server wsdd at %s updated successfully\n", Uri.c_str());
+ if( axiscpp::true_ == ws.stopAxis())
+ {
+ printf( "server at %s stopped successfully\n", Uri.c_str());
+ }
+ else
+ {
+ printf( "stopping server at %s failed\n", Uri.c_str());
+ }
}
else
{
- printf( "wsdd update at %s failed\n", Uri.c_str());
- }
- }
- catch( axiscpp::AxisException& e)
- {
- cout << "Exception : " << e.what() << endl;
- }
- catch( exception& e)
- {
- cout << "Unknown exception has occured : " << e.what() << endl;
- }
- catch( ...)
- {
- cout << "Unknown exception has occured" << endl;
- }
+ wsdd = argv[3];
+ FILE * file = fopen( wsdd.c_str(), "r");
+
+ if (NULL == file)
+ {
+ printf( "WSDD file %s cannot be opened\n", wsdd.c_str ());
+ printf( "Usage: %s <server> <port> <wsdd file>\n", argv[0]);
+ exit( 1);
+ }
+
+ wsdd = "";
+
+ while( !done)
+ {
+ len = fread( Buff, 1, FILEBUFFSIZE - 1, file);
+
+ Buff[len] = 0;
+
+ if( ferror( file))
+ {
+ fclose( file);
+
+ printf( "WSDD file %s cannot be read\n", wsdd.c_str());
+ printf( "Usage: %s <server> <port> <wsdd file>\n", argv[0]);
+ exit( 1);
+ }
+ done = feof( file);
+ wsdd += Buff;
+ }
+ fclose( file);
+
+ axiscpp::xsd__base64Binary v;
+ v.set( (axiscpp::xsd__unsignedByte *) wsdd.c_str(), wsdd.length());
+
+ if( axiscpp::true_ == ws.updateWSDD( v))
+ {
+ printf( "server wsdd at %s updated successfully\n", Uri.c_str());
+ }
+ else
+ {
+ printf( "wsdd update at %s failed\n", Uri.c_str());
+ }
+ }
+ }
+ catch( axiscpp::AxisException& e)
+ {
+ cout << "Exception : " << e.what() << endl;
+ }
+ catch( exception& e)
+ {
+ cout << "Unknown exception has occured : " << e.what() << endl;
+ }
+ catch( ...)
+ {
+ cout << "Unknown exception has occured" << endl;
+ }
return 0;
}
Modified: webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp (original)
+++ webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.cpp Fri Apr 28 07:59:05 2006
@@ -129,4 +129,85 @@
}
}
}
+
+
+xsd__boolean AxisAdminService::stopAxis()
+{
+ xsd__boolean Ret = false_;
+ const char* pcCmplxFaultName = NULL;
+ try
+ {
+ if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER)) return Ret;
+
+ if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
+ m_pCall->setTransportProperty(SOAPACTION_HEADER , "AxisAdmin#stopAxis");
+
+ m_pCall->setSOAPVersion(SOAP_VER_1_1);
+ m_pCall->setOperation("stopAxis", "http://www.opensource.lk/xsd");
+
+ includeSecure();
+ applyUserPreferences();
+
+
+ if (AXIS_SUCCESS == m_pCall->invoke())
+ {
+ if(AXIS_SUCCESS == m_pCall->checkMessage("stopAxisResponse", "http://www.opensource.lk/xsd"))
+ {
+ xsd__boolean * pReturn = m_pCall->getElementAsBoolean("return", 0);
+ if(pReturn)
+ {
+ Ret = *pReturn;
+ Axis::AxisDelete( (void *) pReturn, XSD_BOOLEAN);
+ }
+ }
+ }
+ m_pCall->unInitialize();
+ return Ret;
+ }
+ catch(AxisException& e)
+ {
+ int iExceptionCode = e.getExceptionCode();
+
+ if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
+ {
+ m_pCall->unInitialize();
+ throw;
+ }
+
+ ISoapFault* pSoapFault = (ISoapFault*)
+ m_pCall->checkFault("Fault","http://localhost/axis/AxisAdmin" );
+
+ if(pSoapFault)
+ {
+ const char *detail = pSoapFault->getSimpleFaultDetail();
+ bool deleteDetail=false;
+
+ if (NULL==detail || 0==strlen(detail))
+ {
+ detail=m_pCall->getFaultAsXMLString();
+ if (NULL==detail)
+ detail="";
+ else
+ deleteDetail=true;
+ }
+
+ OtherFaultException ofe(pSoapFault->getFaultcode(),
+ pSoapFault->getFaultstring(), pSoapFault->getFaultactor(),
+ detail, iExceptionCode);
+
+ if (deleteDetail && NULL!=detail)
+ Axis::AxisDelete( (void *) const_cast<char*>(detail), XSD_STRING);
+
+ m_pCall->unInitialize();
+ delete pSoapFault;
+ throw ofe;
+ }
+ else
+ {
+ m_pCall->unInitialize();
+ delete pSoapFault;
+ throw;
+ }
+ }
+}
AXIS_CPP_NAMESPACE_END
Modified: webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h (original)
+++ webservices/axis/trunk/c/src/client/adminclient/AxisAdminService.h Fri Apr 28 07:59:05 2006
@@ -37,6 +37,7 @@
AxisAdminService();
virtual ~AxisAdminService();
xsd__boolean updateWSDD(xsd__base64Binary Value0);
+ xsd__boolean stopAxis();
};
AXIS_CPP_NAMESPACE_END
Modified: webservices/axis/trunk/c/src/common/AdminUtils.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/common/AdminUtils.cpp?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/AdminUtils.cpp (original)
+++ webservices/axis/trunk/c/src/common/AdminUtils.cpp Fri Apr 28 07:59:05 2006
@@ -16,6 +16,7 @@
*/
#include "AdminUtils.h"
+#include <axis/Axis.hpp>
#include "../wsdd/WSDDDeployment.h"
extern AXIS_CPP_NAMESPACE_PREFIX WSDDDeployment* g_pWSDDDeployment;
@@ -35,6 +36,13 @@
int AdminUtils::updateWSDD(AxisChar* wsdd)
{
return g_pWSDDDeployment->updateWSDD(wsdd);
+}
+
+
+
+void AdminUtils::stopAxis()
+{
+ Axis::stopAxis();
}
AXIS_CPP_NAMESPACE_END
Modified: webservices/axis/trunk/c/src/common/AdminUtils.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/common/AdminUtils.h?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/AdminUtils.h (original)
+++ webservices/axis/trunk/c/src/common/AdminUtils.h Fri Apr 28 07:59:05 2006
@@ -55,6 +55,11 @@
* @return AXIS_SUCCESS if the WSDD update successful, AXIS_FAIL otherwise.
*/
int updateWSDD(AxisChar* wsdd);
+
+ /**
+ *
+ */
+ void stopAxis();
};
AXIS_CPP_NAMESPACE_END
Modified: webservices/axis/trunk/c/src/common/IAdminUtils.h
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/common/IAdminUtils.h?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/common/IAdminUtils.h (original)
+++ webservices/axis/trunk/c/src/common/IAdminUtils.h Fri Apr 28 07:59:05 2006
@@ -56,6 +56,8 @@
* @return AXIS_SUCCESS if the WSDD update successful, AXIS_FAIL otherwise.
*/
virtual int updateWSDD(AxisChar* wsdd)=0;
+
+ virtual void stopAxis()=0;
};
AXIS_CPP_NAMESPACE_END
Modified: webservices/axis/trunk/c/src/engine/Axis.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/engine/Axis.cpp?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/engine/Axis.cpp (original)
+++ webservices/axis/trunk/c/src/engine/Axis.cpp Fri Apr 28 07:59:05 2006
@@ -85,6 +85,7 @@
DeserializerPool* g_pDeserializerPool;
SerializerPool* g_pSerializerPool;
HandlerPool* g_pHandlerPool;
+bool g_isRunning;
// Unsynchronized read-only global variables.
WSDDDeployment* g_pWSDDDeployment;
@@ -435,6 +436,7 @@
/* Ok if we can't read config file */
status = AXIS_SUCCESS;
}
+ g_isRunning = true;
}
else if (AxisEngine::m_bServer != bServer)
{
@@ -467,6 +469,7 @@
{
if (--g_uModuleInitialize == 0)
{
+ g_isRunning = false;
TypeMapping::uninitialize();
URIMapping::uninitialize();
if (!AxisEngine::m_bServer) // we have to deal with transport factory only if it is the client
@@ -753,4 +756,16 @@
default:
;
}
+}
+
+bool Axis::isRunning()
+{
+ return g_isRunning;
+}
+
+void Axis::stopAxis()
+{
+ start_initializing();
+ g_isRunning = false;
+ done_initializing();
}
Modified: webservices/axis/trunk/c/src/server/adminservice/AxisAdmin.wsdl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/server/adminservice/AxisAdmin.wsdl?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/server/adminservice/AxisAdmin.wsdl (original)
+++ webservices/axis/trunk/c/src/server/adminservice/AxisAdmin.wsdl Fri Apr 28 07:59:05 2006
@@ -13,66 +13,97 @@
<!-- See the License for the specific language governing permissions and -->
<!-- limitations under the License. -->
-<definitions name="AxisAdminService"
- targetNamespace="http://www.opensource.lk/AxisAdmin"
- xmlns="http://schemas.xmlsoap.org/wsdl/"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:tns="http://www.opensource.lk/AxisAdmin"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xsd1="http://www.opensource.lk/xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <types>
- <schema targetNamespace="http://www.opensource.lk/xsd"
- xmlns="http://www.w3.org/2001/XMLSchema"
- xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <element name="updateWSDD">
- <complexType>
- <sequence>
- <element name="wsdd" type="xsd:base64Binary"/>
- </sequence>
- </complexType>
- </element>
- <element name="updateWSDDResponse">
- <complexType>
- <sequence>
- <element name="return" type="xsd:boolean"/>
- </sequence>
- </complexType>
- </element>
- </schema>
- </types>
- <message name="updateWSDD">
- <part element="xsd1:updateWSDD" name="parameters"/>
- </message>
- <message name="updateWSDDResponse">
- <part element="xsd1:updateWSDDResponse" name="parameters"/>
- </message>
- <portType name="AxisAdminService">
- <operation name="updateWSDD">
- <input message="tns:updateWSDD" name="updateWSDD"/>
- <output message="tns:updateWSDDResponse" name="updateWSDDResponse"/>
- </operation>
- </portType>
- <binding name="AxisAdminPortBinding" type="tns:AxisAdminService">
- <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
- <operation name="updateWSDD">
- <soap:operation soapAction="AxisAdmin#updateWSDD" style="document"/>
- <input name="updateWSDD">
- <soap:body namespace="http://www.opensource.lk/AxisAdmin"
- use="literal"/>
- </input>
- <output name="updateWSDDResponse">
- <soap:body namespace="http://www.opensource.lk/AxisAdmin"
- use="literal"/>
- </output>
- </operation>
- </binding>
- <service name="AxisAdmin">
- <port binding="tns:AxisAdminPortBinding"
- name="AxisAdminParamPort">
- <soap:address
- location="http://localhost/axis/AxisAdmin"/>
- </port>
- </service>
+<definitions name="AxisAdminService"
+ targetNamespace="http://www.opensource.lk/AxisAdmin"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://www.opensource.lk/AxisAdmin"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsd1="http://www.opensource.lk/xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <types>
+ <schema targetNamespace="http://www.opensource.lk/xsd"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <element name="updateWSDD">
+ <complexType>
+ <sequence>
+ <element name="wsdd" type="xsd:base64Binary" />
+ </sequence>
+ </complexType>
+ </element>
+ <element name="updateWSDDResponse">
+ <complexType>
+ <sequence>
+ <element name="return" type="xsd:boolean" />
+ </sequence>
+ </complexType>
+ </element>
+ <xsd:element name="stopAxis">
+ <xsd:complexType></xsd:complexType>
+ </xsd:element>
+ <xsd:element name="stopAxisResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="return" type="xsd:boolean"></xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </schema>
+ </types>
+ <message name="updateWSDD">
+ <part element="xsd1:updateWSDD" name="parameters" />
+ </message>
+ <message name="updateWSDDResponse">
+ <part element="xsd1:updateWSDDResponse" name="parameters" />
+ </message>
+ <message name="stopAxisResponse">
+ <part element="xsd1:stopAxisResponse" name="parameters" />
+ </message>
+ <message name="stopAxis">
+ <part element="xsd1:stopAxis" name="parameters" />
+ </message>
+ <portType name="AxisAdminService">
+ <operation name="updateWSDD">
+ <input message="tns:updateWSDD" name="updateWSDD" />
+ <output message="tns:updateWSDDResponse"
+ name="updateWSDDResponse" />
+ </operation>
+ <operation name="stopAxis">
+ <input message="tns:stopAxis" name="stopAxis" />
+ <output message="tns:stopAxisResponse"
+ name="stopAxisResponse" />
+ </operation>
+ </portType>
+ <binding name="AxisAdminPortBinding" type="tns:AxisAdminService">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="updateWSDD">
+ <soap:operation soapAction="AxisAdmin#updateWSDD"
+ style="document" />
+ <input name="updateWSDD">
+ <soap:body use="literal" />
+ </input>
+ <output name="updateWSDDResponse">
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ <operation name="stopAxis">
+ <soap:operation style="document"
+ soapAction="AxisAdmin#stopAxis" />
+ <input name="stopAxis">
+ <soap:body use="literal" />
+ </input>
+ <output name="stopAxisResponse">
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="AxisAdmin">
+ <port binding="tns:AxisAdminPortBinding"
+ name="AxisAdminParamPort">
+ <soap:address location="http://localhost/axis/AxisAdmin" />
+ </port>
+ </service>
</definitions>
Modified: webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.cpp?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.cpp (original)
+++ webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.cpp Fri Apr 28 07:59:05 2006
@@ -44,6 +44,10 @@
{
return updateWSDD(mc);
}
+ else if ( 0 == strcmp(method, "stopAxis") )
+ {
+ return stopAxis(mc);
+ }
else
{
return AXIS_FAIL;
@@ -110,5 +114,55 @@
{
return AXIS_FAIL;
}
+}
+
+
+/*
+ * This method wrap the service method
+ */
+int AxisAdminServiceWrapper::stopAxis(void* pMsg)
+{
+ IMessageData* mc = (IMessageData*)pMsg;
+ int nStatus;
+ IWrapperSoapSerializer* pIWSSZ = NULL;
+ mc->getSoapSerializer(&pIWSSZ);
+ if (!pIWSSZ)
+ {
+ return AXIS_FAIL;
+ }
+ IWrapperSoapDeSerializer* pIWSDZ = NULL;
+ mc->getSoapDeSerializer(&pIWSDZ);
+ if (!pIWSDZ)
+ {
+ return AXIS_FAIL;
+ }
+ /* check whether we have got correct message */
+ if (AXIS_SUCCESS != pIWSDZ->checkMessageBody("stopAxis", "http://www.opensource.lk/xsd"))
+ {
+ return AXIS_FAIL;
+ }
+ pIWSSZ->createSoapMethod("stopAxisResponse", "http://www.opensource.lk/xsd");
+
+ if (AXIS_SUCCESS != (nStatus = pIWSDZ->getStatus()))
+ {
+ return nStatus;
+ }
+
+ try
+ {
+ xsd__boolean ret = false_;
+ IAdminUtils* pAdminUtils;
+ mc->getAdminUtils (&pAdminUtils);
+ if (pAdminUtils)
+ {
+ pAdminUtils->stopAxis ();
+ ret = true_;
+ }
+ return pIWSSZ->addOutputParam ("return", (void*) &ret, XSD_BOOLEAN);
+ }
+ catch(...)
+ {
+ return AXIS_FAIL;
+ }
}
Modified: webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.hpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.hpp?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.hpp (original)
+++ webservices/axis/trunk/c/src/server/adminservice/AxisAdminServiceWrapper.hpp Fri Apr 28 07:59:05 2006
@@ -39,6 +39,7 @@
AXIS_BINDING_STYLE AXISCALL getBindingStyle(){return DOC_LITERAL;};
private:/*Methods corresponding to the web service methods*/
int updateWSDD(void* pMsg);
+ int stopAxis(void* pMsg);
};
#endif /* !defined(__AXISADMINSERVICEWRAPPER_SERVERWRAPPER_H__INCLUDED_)*/
Modified: webservices/axis/trunk/c/src/server/simple_axis_server/SimpleAxisServer.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/server/simple_axis_server/SimpleAxisServer.cpp?rev=397914&r1=397913&r2=397914&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/server/simple_axis_server/SimpleAxisServer.cpp (original)
+++ webservices/axis/trunk/c/src/server/simple_axis_server/SimpleAxisServer.cpp Fri Apr 28 07:59:05 2006
@@ -34,6 +34,7 @@
#include "SimpleAxisTransport.h"
#include <iostream>
+#include <axis/Axis.hpp>
#include <axis/AxisCPPConfigDefaults.hpp>
@@ -207,7 +208,7 @@
initialize_module( 1);
- while (running)
+ while (Axis::isRunning())
{
FD_ZERO (&sockSet);
FD_SET (servSock[0], &sockSet);