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 sa...@apache.org on 2003/07/27 11:59:48 UTC
cvs commit: xml-axis/c/src/engine AxisEngine.h AxisEngine.cpp
sanjaya 2003/07/27 02:59:48
Modified: c/src/engine AxisEngine.h AxisEngine.cpp
Log:
added new method to return the WSDDDeployment object associated with
an instance of AxisEngine.
Modified the code the use the SOAPAction http header as the service name.
Revision Changes Path
1.4 +1 -0 xml-axis/c/src/engine/AxisEngine.h
Index: AxisEngine.h
===================================================================
RCS file: /home/cvs/xml-axis/c/src/engine/AxisEngine.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AxisEngine.h 24 Jul 2003 09:28:49 -0000 1.3
+++ AxisEngine.h 27 Jul 2003 09:59:47 -0000 1.4
@@ -96,6 +96,7 @@
static AxisEngine* GetAxisEngine();
int Process(soapstream* soap);
+ WSDDDeployment* getWSDDDeployment();
};
#endif
1.9 +17 -19 xml-axis/c/src/engine/AxisEngine.cpp
Index: AxisEngine.cpp
===================================================================
RCS file: /home/cvs/xml-axis/c/src/engine/AxisEngine.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- AxisEngine.cpp 24 Jul 2003 09:30:01 -0000 1.8
+++ AxisEngine.cpp 27 Jul 2003 09:59:48 -0000 1.9
@@ -24,15 +24,6 @@
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
-
-
-
-
-
-
-
-
-
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "SOAP" and "Apache Software Foundation" must
@@ -83,7 +74,7 @@
#ifdef WIN32
-#define WSDDFILEPATH "C:/Apache/Axis/server.wsdd"
+#define WSDDFILEPATH "./Axis/conf/server.wsdd"
#else //For linux
#define WSDDFILEPATH "/usr/local/axiscpp/axis/server.wsdd"
#endif
@@ -97,8 +88,6 @@
AxisEngine* AxisEngine::m_pObject = NULL;
-
-
AxisEngine::AxisEngine()
{
//Create Serializer and Deserializer
@@ -121,6 +110,15 @@
XMLPlatformUtils::Terminate();
}
+WSDDDeployment * AxisEngine::getWSDDDeployment()
+{
+ if(m_pWSDD)
+ {
+ return m_pWSDD;
+ }
+ return NULL;
+}
+
AxisEngine* AxisEngine::GetAxisEngine()
{
if (!m_pObject)
@@ -149,11 +147,11 @@
int AxisEngine::Process(soapstream* soap)
{
- send_response_bytes("in process");
+
try
{
DEBUG1("AxisEngine::Process");
-
+
MessageData* pMsg = NULL;
MemBufInputSource* pSoapInput = NULL;
WSDDHandlerList* pHandlerList = NULL;
@@ -167,15 +165,15 @@
pMsg->m_Protocol = soap->trtype;
pMsg->SetSerializer(m_pSZ);
pMsg->SetDeSerializer(m_pDZ);
-
+
//Adding SoapEnvelop and SoapBody to Serializer
SoapEnvelope* pEnv = new SoapEnvelope();
pMsg->m_pSZ->setSoapEnvelope(pEnv);
pMsg->m_pSZ->setSoapBody(new SoapBody());
- string service = "Maths";//getheader(soap, SOAPACTIONHEADER);
+ string service = getheader(soap, SOAPACTIONHEADER);
+ service = service.substr(1, service.length() - 2);
-
DEBUG2("string service = Maths :",service.c_str());
if (service.empty())
@@ -204,7 +202,7 @@
//if no soap then quit
if (nChars <= 0) break;
pSoapInput = new MemBufInputSource((const unsigned char*)hugebuffer, nChars ,"bufferid",false);
-
+
if (SUCCESS != m_pDZ->SetStream(pSoapInput)) //this parses the full soap request.
{
pMsg->m_pSZ->setSoapFault(SoapFault::getSoapFault(SF_SOAPCONTENTERROR));
@@ -309,7 +307,7 @@
if (pSoapInput) delete pSoapInput; //this should not be done if we use progressive parsing
//set soap version to the serializer.
//Serialize
- //m_sResponse = "";
+ send_transport_information(soap);
int iStatus= m_pSZ->getStream();
//soap->so.http.op_soap = new char(sResponse.length() + 1);