roshan 2003/07/28 22:37:11
Modified: c/src/engine AxisEngine.cpp
Log:
after changes
Revision Changes Path
1.10 +41 -24 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.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AxisEngine.cpp 27 Jul 2003 09:59:48 -0000 1.9
+++ AxisEngine.cpp 29 Jul 2003 05:37:11 -0000 1.10
@@ -74,7 +74,8 @@
#ifdef WIN32
-#define WSDDFILEPATH "./Axis/conf/server.wsdd"
+//#define WSDDFILEPATH "./Axis/conf/server.wsdd"
+#define WSDDFILEPATH "C:/Apache/Axis/server.wsdd"
#else //For linux
#define WSDDFILEPATH "/usr/local/axiscpp/axis/server.wsdd"
#endif
@@ -171,24 +172,8 @@
pMsg->m_pSZ->setSoapEnvelope(pEnv);
pMsg->m_pSZ->setSoapBody(new SoapBody());
- string service = getheader(soap, SOAPACTIONHEADER);
- service = service.substr(1, service.length() - 2);
+ //---------------------start--------------------------
- DEBUG2("string service = Maths :",service.c_str());
-
- if (service.empty())
- {
-
pMsg->m_pSZ->setSoapFault(SoapFault::getSoapFault(SF_SOAPACTIONEMPTY));
- break; //do .. while(0)
- }
- pService = m_pWSDD->GetService(service);
- if (!pService) {
-
pMsg->m_pSZ->setSoapFault(SoapFault::getSoapFault(SF_SERVICENOTFOUND));
- break; //do .. while(0)
- }
-
- pMsg->SetService(pService);
-
//Deserialize
//---------START XERCES SAX2 SPCIFIC CODE---------//
//a huge buffer to store the whole soap request stream
@@ -198,7 +183,7 @@
//request a huge number of bytes to get the whole soap request
//when pull parsing is used this should change
get_request_bytes(hugebuffer, 10000, &nChars);
-DEBUG1(hugebuffer);
+ DEBUG1(hugebuffer);
//if no soap then quit
if (nChars <= 0) break;
pSoapInput = new MemBufInputSource((const unsigned char*)hugebuffer,
nChars ,"bufferid",false);
@@ -209,17 +194,49 @@
break; //do .. while(0)
}
//---------END XERCES SAX2 SPCIFIC CODE---------//
- //check for soap version in the request and decide whether we
support it or not
- //if we do not support send a soapfault with version mismatch.
int nSoapVersion = pMsg->m_pDZ->GetVersion();
+
+ //Set Soap version in the Serializer
+ pMsg->m_pSZ->setSoapVersion((SOAP_VERSION)nSoapVersion);
+
+ //---------------------end--------------------------
+
+
+ char* cService= getheader(soap, SOAPACTIONHEADER);
+ string service;
+ if(cService==NULL) {
+ service="";
+ }else {
+ service= cService;
+ }
+
+ //string service = getheader(soap, SOAPACTIONHEADER);
+ service = service.substr(1, service.length() - 2);
+
+ DEBUG2("string service = Maths :",service.c_str());
+
+ if (service.empty())
+ {
+
pMsg->m_pSZ->setSoapFault(SoapFault::getSoapFault(SF_SOAPACTIONEMPTY));
+ break; //do .. while(0)
+ }
+ pService = m_pWSDD->GetService(service);
+ if (!pService) {
+
pMsg->m_pSZ->setSoapFault(SoapFault::getSoapFault(SF_SERVICENOTFOUND));
+ break; //do .. while(0)
+ }
+
+ pMsg->SetService(pService);
+
+
+ //check for soap version in the request and decide whether we
support it or not
+ //if we do not support send a soapfault with version mismatch.
if (nSoapVersion == VERSION_LAST) //version not supported
{
pMsg->m_pSZ->setSoapFault(SoapFault::getSoapFault(SF_VERSION_MISMATCH));
break; //do .. while(0)
- }
- //Set Soap version in the Serializer
- pMsg->m_pSZ->setSoapVersion((SOAP_VERSION)nSoapVersion);
+ }
//add namespace URIs of the SoapEnvelope of the response
corresponding to the soap version.
Attribute* pNS = new
Attribute(g_sObjSoapEnvVersionsStruct[nSoapVersion].pchEnvelopePrefix,