You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/01/23 11:30:57 UTC
svn commit: r371517 - in /webservices/axis2/trunk/c:
include/axis2_http_transport_utils.h include/axis2_stream.h
modules/platforms/windows/axis2_windows.h modules/util/utils.c
test/core/transport/http/test_http_transport.c
Author: samisa
Date: Mon Jan 23 02:30:42 2006
New Revision: 371517
URL: http://svn.apache.org/viewcvs?rev=371517&view=rev
Log:
Added some testcases. Added Content-Length checking logic
Modified:
webservices/axis2/trunk/c/include/axis2_http_transport_utils.h
webservices/axis2/trunk/c/include/axis2_stream.h
webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h
webservices/axis2/trunk/c/modules/util/utils.c
webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c
Modified: webservices/axis2/trunk/c/include/axis2_http_transport_utils.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_http_transport_utils.h?rev=371517&r1=371516&r2=371517&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_transport_utils.h (original)
+++ webservices/axis2/trunk/c/include/axis2_http_transport_utils.h Mon Jan 23 02:30:42 2006
@@ -51,6 +51,8 @@
{
axis2_env_t *env;
axis2_stream_t *in_stream;
+ int content_length;
+ int unread_len;
};
typedef struct axis2_callback_info axis2_callback_info_t;
@@ -58,7 +60,7 @@
axis2_http_transport_utils_process_http_post_request
(axis2_env_t **env, axis2_msg_ctx_t *msg_ctx,
axis2_stream_t *in_stream, axis2_stream_t *out_stream,
- axis2_char_t *content_type,
+ axis2_char_t *content_type, int content_length,
axis2_char_t *soap_action_header,
axis2_char_t *request_uri);
Modified: webservices/axis2/trunk/c/include/axis2_stream.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_stream.h?rev=371517&r1=371516&r2=371517&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_stream.h (original)
+++ webservices/axis2/trunk/c/include/axis2_stream.h Mon Jan 23 02:30:42 2006
@@ -114,6 +114,13 @@
*/
int (AXIS2_CALL *get_len) (axis2_stream_t *stream, axis2_env_t **env);
+ /**
+ * Returns the type of the stream as axis2_stream_type_t
+ * @return Type of the stream
+ */
+ axis2_stream_type_t (AXIS2_CALL *get_type) (axis2_stream_t *stream,
+ axis2_env_t **env);
+
};
/**
Modified: webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h?rev=371517&r1=371516&r2=371517&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h (original)
+++ webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h Mon Jan 23 02:30:42 2006
@@ -119,6 +119,11 @@
* Platform specific time
*/
#define AXIS2_TIME_T time_t
+/**
+ * Platform specific method to obtain current time in milli seconds
+ */
+#define AXIS2_PLATFORM_GET_TIME_IN_MILLIS _ftime
+#define AXIS2_PLATFORM_TIMEB timeb
/**
* Platform specific file handling
Modified: webservices/axis2/trunk/c/modules/util/utils.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/utils.c?rev=371517&r1=371516&r2=371517&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/utils.c (original)
+++ webservices/axis2/trunk/c/modules/util/utils.c Mon Jan 23 02:30:42 2006
@@ -52,7 +52,7 @@
if('\0' != *service_str)
{
service_str++; /*to remove the leading '/' */
- tmp = strchr(service_str, '?');
+ tmp = strchr(service_str, '/');
if(NULL != tmp)
{
i = tmp - service_str;
Modified: webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c?rev=371517&r1=371516&r2=371517&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c (original)
+++ webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c Mon Jan 23 02:30:42 2006
@@ -72,6 +72,7 @@
{
char *header_name = "Content-Type";
char *header_value = "text/xml";
+ char *str_header = "Content-Type: text/xml; charset=UTF-8\r\n";
axis2_http_header_t *http_header;
axis2_char_t *external_form = NULL;
@@ -84,6 +85,8 @@
external_form);
AXIS2_FREE(env->allocator, external_form);
AXIS2_HTTP_HEADER_FREE(http_header, &env);
+
+ http_header = axis2_http_header_create_by_str(&env, str_header);
printf("Finished http_header tests ..........\n\n");
}
@@ -132,13 +135,13 @@
status = AXIS2_HTTP_CLIENT_SEND(client, &env, request);
if(status < 0)
{
- printf("Test FAILED ......... \n");
+ printf("Test FAILED .........Can't send the request. Status :%d\n", status);
return;
}
status = AXIS2_HTTP_CLIENT_RECIEVE_HEADER(client, &env);
if(status < 0)
{
- printf("Test FAILED ......... \n");
+ printf("Test FAILED ......... Can't recieve. Status: %d\n", status);
return;
}
response = AXIS2_HTTP_CLIENT_GET_RESPONSE(client, &env);