sanjaya 2003/07/23 06:52:16
Modified: c/src/engine Axis.cpp
Log:
modified to support the new transport module api
Revision Changes Path
1.4 +13 -6 xml-axis/c/src/engine/Axis.cpp
Index: Axis.cpp
===================================================================
RCS file: /home/cvs/xml-axis/c/src/engine/Axis.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Axis.cpp 17 Jul 2003 04:19:09 -0000 1.3
+++ Axis.cpp 23 Jul 2003 13:52:16 -0000 1.4
@@ -3,12 +3,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
+#include "../common/Packet.h"
unsigned char chEBuf[1024];
-extern "C" int process(soapstream *str)
+//17.07.2003 the name process is changed to process_request(soapstream * str)
+extern "C" int process_request(soapstream *str)
{
-
+ DEBUG1("in axis.cpp");
AxisEngine* engine = AxisEngine::GetAxisEngine();
int ret = FAIL;
//the location of the wsdl hardcoded
@@ -25,33 +27,37 @@
case APTHTTP:
if(str->so.http.ip_method==POST)
{
+
+DEBUG1("method is POST");
if (engine)
{
ret = engine->Process(str);
DEBUG1("ret = engine->Process(str);");
+ DEBUG1("are we successful?");
ret = SUCCESS;
}
}
if(str->so.http.ip_method==GET)
{
+DEBUG1("method is GET");
if((outfile = fopen(wsdlloc,"r"))==NULL)
{
+ send_response_bytes("no wsdl to be found");
//handle the error
- str->so.http.op_soap = "Error in reading wsdl
file";
+ //str->so.http.op_soap = "Error in reading
wsdl file";
}
else
{
int charcount = 0;
int acc = 0;
-
while((charcount=fread(oneword,1,bytestoread-1, outfile)) != 0)
{
if(wsdl==NULL)
{
acc += charcount;
wsdl = (char
*)realloc(wsdl,acc);
- wsdl =
strcpy(wsdl,oneword);
+ wsdl = strcpy(wsdl,oneword);
}
else
{
@@ -63,7 +69,8 @@
}
//assign the char pointer that contains the
//wsdl file to the response
- str->so.http.op_soap = wsdl;
+ //str->so.http.op_soap = wsdl;
+ send_response_bytes("dummy wsdl");
ret = SUCCESS;
fclose(outfile);
//free (wsdl);
