Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 9893 invoked from network); 11 Dec 2003 08:52:28 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 11 Dec 2003 08:52:28 -0000 Received: (qmail 89602 invoked by uid 500); 11 Dec 2003 08:52:00 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 89570 invoked by uid 500); 11 Dec 2003 08:52:00 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 89549 invoked from network); 11 Dec 2003 08:52:00 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 11 Dec 2003 08:52:00 -0000 Received: (qmail 9816 invoked by uid 1682); 11 Dec 2003 08:52:23 -0000 Date: 11 Dec 2003 08:52:23 -0000 Message-ID: <20031211085223.9815.qmail@minotaur.apache.org> From: susantha@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/c/vc/soap Soap.dsp X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N susantha 2003/12/11 00:52:23 Modified: c/include/axis/client/transport Tag: CWrapperSupport AxisTransport.h c/src/client/transport/axis Tag: CWrapperSupport AxisTransport.cpp c/vc/server/apache2_0 Tag: CWrapperSupport Apache2_0.dsp c/vc/soap Tag: CWrapperSupport Soap.dsp Added: c/src/server/apache2 Tag: CWrapperSupport mod_axis2.c Log: client transport APIs were corrected Revision Changes Path No revision No revision 1.2.4.1 +1 -1 ws-axis/c/include/axis/client/transport/AxisTransport.h Index: AxisTransport.h =================================================================== RCS file: /home/cvs/ws-axis/c/include/axis/client/transport/AxisTransport.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -u -r1.2 -r1.2.4.1 --- AxisTransport.h 23 Oct 2003 08:26:32 -0000 1.2 +++ AxisTransport.h 11 Dec 2003 08:52:22 -0000 1.2.4.1 @@ -75,7 +75,7 @@ int OpenConnection(); void CloseConnection(); static int Send_bytes(const char* pSendBuffer, const void* pStream); - static int Get_bytes(char* pRecvBuffer, int nBuffSize, int* pRecvSize, const void* pStream); + static int Get_bytes(const char** res, int* retsize, const void* pStream); static int Send_transport_information(void* pSoapStream); /*Ax_soapstream*/ static int Receive_transport_information(void* pSoapStream);/*Ax_soapstream*/ No revision No revision 1.9.4.2 +6 -8 ws-axis/c/src/client/transport/axis/AxisTransport.cpp Index: AxisTransport.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/client/transport/axis/AxisTransport.cpp,v retrieving revision 1.9.4.1 retrieving revision 1.9.4.2 diff -u -r1.9.4.1 -r1.9.4.2 --- AxisTransport.cpp 21 Nov 2003 12:48:08 -0000 1.9.4.1 +++ AxisTransport.cpp 11 Dec 2003 08:52:22 -0000 1.9.4.2 @@ -138,20 +138,18 @@ } -int AxisTransport::Get_bytes(char* pRecvBuffer, int nBuffSize, int* pRecvSize, const void* pStream) +int AxisTransport::Get_bytes(const char** res, int* retsize, const void* pStream) { Receiver* pReceiver = (Receiver*) pStream; const string& strReceive = pReceiver->Recv(); - int nLen = strlen(strReceive.c_str()); - if(nLen < nBuffSize) + *res = strReceive.c_str(); + *retsize = strReceive.length(); + if(!res || *retsize == 0) { - strcpy(pRecvBuffer, strReceive.c_str()); - *pRecvSize = nLen; - return AXIS_SUCCESS; + return AXIS_FAIL; } else - return AXIS_FAIL; - + return AXIS_SUCCESS; } int AxisTransport::Send_transport_information(void* pSoapStream) No revision No revision 1.2.2.1 +39 -27 ws-axis/c/src/server/apache2/mod_axis2.c Index: mod_axis2.c =================================================================== RCS file: /home/cvs/ws-axis/c/src/server/apache2/mod_axis2.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- mod_axis2.c 30 Nov 2003 08:42:34 -0000 1.2 +++ mod_axis2.c 11 Dec 2003 08:52:23 -0000 1.2.2.1 @@ -60,6 +60,10 @@ * @author Sanjaya Singharage (sanjayas@jkcsworld.com) * */ +#ifdef WIN32 +#else +#define PATH_MAX 4096 +#endif #include #include @@ -76,20 +80,24 @@ */ extern int process_request(Ax_soapstream* str); -//extern int process(soapstream *); +/*extern int process(soapstream *);*/ extern unsigned char chEBuf[1024]; -//Should dispatch the headers from within this method +#define SIZEOFMODULEBUFFER 100 + +char g_buffer[SIZEOFMODULEBUFFER]; + +/*Should dispatch the headers from within this method*/ int send_transport_information(Ax_soapstream* hdr) { ap_send_http_header((request_rec*)hdr->str.op_stream); return 0; } -//Call initialize_module() [of Packet.h] from within this method +/*Call initialize_module() [of Packet.h] from within this method*/ void module_init(server_rec *svr_rec, apr_pool_t* p) { - initialize_module(1, ""); + initialize_module(1); } int send_response_bytes(char* res, void* opstream) @@ -98,24 +106,28 @@ return 0; } -//Call initialize_process() [of Packet.h] from within this method +/*Call initialize_process() [of Packet.h] from within this method*/ void axis_Init(server_rec *svr_rec, apr_pool_t* p) {} -//Call finalize_process() [of Packet.h] from within this method +/*Call finalize_process() [of Packet.h] from within this method*/ void axis_Fini(server_rec *svr_rec, apr_pool_t* p) {} -int get_request_bytes(char* req, int reqsize, int* retsize, void* ipstream) +/** + * This function is called by the Axis Engine whenever it needs to get bytes from the + * transport layer. + */ +int get_request_bytes(const char** req, int* retsize, const void* ipstream) { int len_read; - //ap_hard_timeout("util_read", (request_rec*)ipstream); - len_read = ap_get_client_block((request_rec*)ipstream, req, reqsize); - //ap_reset_timeout((request_rec*)ipstream); +// ap_hard_timeout("util_read", (request_rec*)ipstream); + len_read = ap_get_client_block((request_rec*)ipstream, g_buffer, SIZEOFMODULEBUFFER); +// ap_reset_timeout((request_rec*)ipstream); + *req = g_buffer; *retsize = len_read; return 0; } - static int mod_axis_method_handler (request_rec *req_rec) { int rc; @@ -138,31 +150,31 @@ sstr->transport.pGetTrtFunct = send_transport_information; /*isn't there a get transport information function for apache module ?*/ sstr->trtype = APTHTTP; - //req_rec is used as both input and output streams + /*req_rec is used as both input and output streams*/ sstr->str.ip_stream = req_rec; sstr->str.op_stream = req_rec; - //just add some sessionid + /*just add some sessionid*/ sstr->sessionid = "this is temporary session id"; - //set up the read policy from the client. + /*set up the read policy from the client.*/ if ((rc = ap_setup_client_block(req_rec, REQUEST_CHUNKED_ERROR)) != OK) { return rc; } - //the member, "path" of "parsed_uri" contains the uri of the - //request (i.e "/abc/xyz" part of http://somehost/abc/xyz) + /*the member, "path" of "parsed_uri" contains the uri of the*/ + /*request (i.e "/abc/xyz" part of http://somehost/abc/xyz)*/ sstr->so.http.uri_path = req_rec->parsed_uri.path; - //ap_table_elts returns an array_header struct. The nelts element of that struct contains the number of - //input header elements. Finally assigns that to the axis soap data structure. + /*ap_table_elts returns an array_header struct. The nelts element of that struct contains the number of*/ + /*input header elements. Finally assigns that to the axis soap data structure. */ sstr->so.http.ip_headercount = ap_table_elts(req_rec->headers_in)->nelts; if (sstr->so.http.ip_headercount > 0) { - //obtain the array_header from the headers_in table and assign it to the axis soap structure + /*obtain the array_header from the headers_in table and assign it to the axis soap structure*/ arr = ap_table_elts(req_rec->headers_in); pHeaderTable = arr->elts; sstr->so.http.ip_headers = malloc(sizeof(Ax_header)*sstr->so.http.ip_headercount); @@ -173,7 +185,7 @@ (pAx_Headers+ix)->headervalue = (pHeaderTable+ix)->val; } } - //Determine the http method and assign it to the axis soap structure + /*Determine the http method and assign it to the axis soap structure*/ switch (req_rec->method_number) { case M_GET: @@ -183,15 +195,15 @@ case M_POST: sstr->so.http.ip_method = AXIS_HTTP_POST; req_rec->content_type = "text/xml"; - //for SOAP 1.2 this this should be "application/soap+xml" - //but keep this for the moment + /*for SOAP 1.2 this this should be "application/soap+xml" */ + /*but keep this for the moment*/ break; default: sstr->so.http.ip_method = AXIS_HTTP_UNSUPPORTED; } - //tell the client that we are ready to receive content and check whether client will send content - //control will pass to this block only if there is body content in the request + /*tell the client that we are ready to receive content and check whether client will send content*/ + /*control will pass to this block only if there is body content in the request*/ if (ap_should_client_block(req_rec)); if(0 != process_request(sstr)) @@ -202,16 +214,16 @@ free(sstr); - //free(arr); + /*free(arr);*/ return OK; } static void mod_axis_register_hooks (apr_pool_t *p) { ap_hook_child_init(module_init, NULL, NULL, APR_HOOK_REALLY_FIRST); - //ap_hook_pre_connection(axis_Init, NULL, NULL, APR_HOOK_FIRST); + /*ap_hook_pre_connection(axis_Init, NULL, NULL, APR_HOOK_FIRST);*/ ap_hook_handler(mod_axis_method_handler, NULL, NULL, APR_HOOK_LAST); - //ap_hook_process_connection(axis_Fini, NULL, NULL, APR_HOOK_REALLY_LAST); + /*ap_hook_process_connection(axis_Fini, NULL, NULL, APR_HOOK_REALLY_LAST);*/ } No revision No revision 1.7.2.3 +4 -0 ws-axis/c/vc/server/apache2_0/Apache2_0.dsp Index: Apache2_0.dsp =================================================================== RCS file: /home/cvs/ws-axis/c/vc/server/apache2_0/Apache2_0.dsp,v retrieving revision 1.7.2.2 retrieving revision 1.7.2.3 diff -u -r1.7.2.2 -r1.7.2.3 --- Apache2_0.dsp 11 Dec 2003 04:29:57 -0000 1.7.2.2 +++ Apache2_0.dsp 11 Dec 2003 08:52:23 -0000 1.7.2.3 @@ -90,6 +90,10 @@ # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\src\server\apache2\mod_axis2.c +# End Source File # End Group # Begin Group "Header Files" No revision No revision 1.10.4.6 +1 -1 ws-axis/c/vc/soap/Soap.dsp Index: Soap.dsp =================================================================== RCS file: /home/cvs/ws-axis/c/vc/soap/Soap.dsp,v retrieving revision 1.10.4.5 retrieving revision 1.10.4.6 diff -u -r1.10.4.5 -r1.10.4.6 --- Soap.dsp 11 Dec 2003 04:29:57 -0000 1.10.4.5 +++ Soap.dsp 11 Dec 2003 08:52:23 -0000 1.10.4.6 @@ -41,7 +41,7 @@ # PROP Intermediate_Dir "../../bin/win32/soap" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /O2 /I "../../include" /I "C:\Expat-1.95.7\Source\lib" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FD /c +# ADD CPP /nologo /MT /W3 /O2 /I "../../include" /I "C:\Expat-1.95.7\Source\lib" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FR /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG"