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 ka...@apache.org on 2006/12/08 06:28:22 UTC

svn commit: r483837 - in /webservices/axis2/trunk/c: rampart/samples/client/enc_echo/data/ rampart/src/util/ util/include/ util/src/ util/src/platforms/unix/

Author: kaushalye
Date: Thu Dec  7 21:28:21 2006
New Revision: 483837

URL: http://svn.apache.org/viewvc?view=rev&rev=483837
Log:
Applying patch to allow axis2_date_time to show milliseconds.
Changed rampart util to compare time using milliseconds.

Modified:
    webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/client.enc.axis2.xml
    webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml
    webservices/axis2/trunk/c/rampart/src/util/rampart_util.c
    webservices/axis2/trunk/c/util/include/axis2_date_time.h
    webservices/axis2/trunk/c/util/src/Makefile.am
    webservices/axis2/trunk/c/util/src/date_time.c
    webservices/axis2/trunk/c/util/src/platforms/unix/Makefile.am

Modified: webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/client.enc.axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/client.enc.axis2.xml?view=diff&rev=483837&r1=483836&r2=483837
==============================================================================
--- webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/client.enc.axis2.xml (original)
+++ webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/client.enc.axis2.xml Thu Dec  7 21:28:21 2006
@@ -30,6 +30,7 @@
         <encryptionKeyTransportAlgorithm>http://www.w3.org/2001/04/xmlenc#rsa-1_5</encryptionKeyTransportAlgorithm>
         <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#aes256-cbc</encryptionSymAlgorithm>  
         <encryptionPropFile>/home/kau/axis2/c/rampart/samples/keys/xhome/y_cert.cert</encryptionPropFile>
+        <!--encryptionKeyIdentifier options : Embedded IssuerSerial DirectReference KeyIdentifier-->
         <encryptionKeyIdentifier>IssuerSerial</encryptionKeyIdentifier>
       </action>
     </parameter>
@@ -41,7 +42,7 @@
         <!--Following should be changed with your DLL or SO path-->
         <passwordCallbackClass>/home/kau/axis2/c/deploy/bin/samples/rampart/callback/libpwcb.so</passwordCallbackClass>
         <decryptionPropFile>/home/kau/axis2/c/rampart/samples/keys/xhome/x_store.pfx</decryptionPropFile>
-        <encryptionUser>x12345</encryptionUser>
+        <encryptionUser>x</encryptionUser>
       </action>
     </parameter>
     <!--Rampart configurations END -->

Modified: webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml?view=diff&rev=483837&r1=483836&r2=483837
==============================================================================
--- webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml (original)
+++ webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml Thu Dec  7 21:28:21 2006
@@ -30,6 +30,7 @@
         <encryptionKeyTransportAlgorithm>http://www.w3.org/2001/04/xmlenc#rsa-1_5</encryptionKeyTransportAlgorithm>
         <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#aes256-cbc</encryptionSymAlgorithm>  
         <encryptionPropFile>/home/kau/axis2/c/rampart/samples/keys/yhome/x_cert.cert</encryptionPropFile>
+        <!--encryptionKeyIdentifier options : Embedded IssuerSerial DirectReference KeyIdentifier-->
         <encryptionKeyIdentifier>IssuerSerial</encryptionKeyIdentifier>
       </action>
     </parameter>
@@ -41,7 +42,7 @@
         <!--Following should be changed with your DLL or SO path-->
         <passwordCallbackClass>/home/kau/axis2/c/deploy/bin/samples/rampart/callback/libpwcb.so</passwordCallbackClass>
         <decryptionPropFile>/home/kau/axis2/c/rampart/samples/keys/yhome/y_store.pfx</decryptionPropFile>
-        <encryptionUser>y12345</encryptionUser>
+        <encryptionUser>y</encryptionUser>
       </action>
     </parameter>
     <!--Rampart configurations END -->

Modified: webservices/axis2/trunk/c/rampart/src/util/rampart_util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/util/rampart_util.c?view=diff&rev=483837&r1=483836&r2=483837
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/util/rampart_util.c (original)
+++ webservices/axis2/trunk/c/rampart/src/util/rampart_util.c Thu Dec  7 21:28:21 2006
@@ -130,8 +130,8 @@
     axis2_status_t status = AXIS2_FAILURE;
     axis2_date_time_t *dt1 = NULL;
     axis2_date_time_t *dt2 = NULL;
-    int yyyy1, mm1, dd1, hh1, mi1, ss1;
-    int yyyy2, mm2, dd2, hh2, mi2, ss2;
+    int yyyy1, mm1, dd1, hh1, mi1, ss1, ml1;
+    int yyyy2, mm2, dd2, hh2, mi2, ss2, ml2;
 
 
     dt1 = axis2_date_time_create(env);
@@ -149,6 +149,7 @@
     hh1 = AXIS2_DATE_TIME_GET_HOUR(dt1, env);
     mi1 = AXIS2_DATE_TIME_GET_MINUTE(dt1, env);
     ss1 = AXIS2_DATE_TIME_GET_SECOND(dt1, env);
+    ml1 = 000;
 
     status = AXIS2_DATE_TIME_DESERIALIZE_DATE_TIME(dt2, env, dt2_str);
     if (status == AXIS2_FAILURE)
@@ -162,7 +163,7 @@
     hh2 = AXIS2_DATE_TIME_GET_HOUR(dt2, env);
     mi2 = AXIS2_DATE_TIME_GET_MINUTE(dt2, env);
     ss2 = AXIS2_DATE_TIME_GET_SECOND(dt2, env);
-
+    ml2 = 000;
     /**
     Comparison. 
     We expect dt1_str < dt2_str/ Otherwise FAILURE
@@ -203,6 +204,7 @@
         return AXIS2_FAILURE;
     }
 
+
     if (mi1 < mi2)
     {
         return AXIS2_SUCCESS;
@@ -221,6 +223,14 @@
         return AXIS2_FAILURE;
     }
 
+    if (ml1 < ml2)
+    {
+        return AXIS2_SUCCESS;
+    }
+    else if (ml1 > ml2)
+    {
+        return AXIS2_FAILURE;
+    } 
 
     /*AXIS2_DATE_TIME_FREE(dt1, env);
     AXIS2_DATE_TIME_FREE(dt2, env);*/

Modified: webservices/axis2/trunk/c/util/include/axis2_date_time.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_date_time.h?view=diff&rev=483837&r1=483836&r2=483837
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_date_time.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_date_time.h Thu Dec  7 21:28:21 2006
@@ -105,7 +105,7 @@
     set_date_time ) (axis2_date_time_t* date_time,
                         const axis2_env_t *env,
                         int year, int month, int date,
-                        int hour, int min, int second );
+                        int hour, int min, int second,int milliseconds);
  
    /**
     * retrive the stored time  as a string
@@ -245,7 +245,7 @@
 #define AXIS2_DATE_TIME_SET_DATE_TIME(date_time, env, \
                            year, month, date, hour, min, second ) \
         ((date_time)->ops->set_date_time (date_time, env, \
-                           year, month, date, hour, min, second ) )
+                           year, month, date, hour, min, second,milliseconds) )
  
 #define AXIS2_DATE_TIME_SERIALIZE_TIME(date_time, env) \
         ((date_time)->ops->serialize_time (date_time, env ) )

Modified: webservices/axis2/trunk/c/util/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/Makefile.am?view=diff&rev=483837&r1=483836&r2=483837
==============================================================================
--- webservices/axis2/trunk/c/util/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/util/src/Makefile.am Thu Dec  7 21:28:21 2006
@@ -31,7 +31,8 @@
                         uri.c \
                         date_time.c \
                         base64_binary.c \
-                        properties.c 
+                        properties.c \
+						date_time_util.c
                         
 libaxis2_util_la_LIBADD =	$(top_builddir)/src/platforms/unix/libaxis2_unix.la \
                     		$(top_builddir)/src/minizip/libaxis2_minizip.la

Modified: webservices/axis2/trunk/c/util/src/date_time.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/date_time.c?view=diff&rev=483837&r1=483836&r2=483837
==============================================================================
--- webservices/axis2/trunk/c/util/src/date_time.c (original)
+++ webservices/axis2/trunk/c/util/src/date_time.c Thu Dec  7 21:28:21 2006
@@ -68,7 +68,7 @@
 axis2_date_time_set_date_time(axis2_date_time_t* date_time,
         const axis2_env_t *env,
         int year, int month, int date,
-        int hour, int min, int second);
+        int hour, int min, int second,int milliseconds);
 
 char* AXIS2_CALL
 axis2_date_time_serialize_time(axis2_date_time_t *date_time,
@@ -219,8 +219,8 @@
 
     date_time_impl = AXIS2_INTF_TO_IMPL(date_time);
 
-	sscanf(time_str, "%d:%d:%dZ" , &date_time_impl-> hour, &date_time_impl-> min,
-            &date_time_impl-> sec);
+    sscanf(time_str, "%d:%d:%d:%dZ" , &date_time_impl-> hour, &date_time_impl-> min,
+            &date_time_impl-> sec,&date_time_impl-> msec);
     return AXIS2_SUCCESS;
 }
 
@@ -252,9 +252,9 @@
 
     date_time_impl = AXIS2_INTF_TO_IMPL(date_time);
 
-    sscanf(date_time_str, "%d-%d-%dT%d:%d:%dZ", &date_time_impl-> year, &date_time_impl-> mon,
+    sscanf(date_time_str, "%d-%d-%dT%d:%d:%d:%dZ", &date_time_impl-> year, &date_time_impl-> mon,
             &date_time_impl-> day, &date_time_impl-> hour, &date_time_impl-> min,
-            &date_time_impl-> sec);
+            &date_time_impl-> sec,&date_time_impl-> msec);
     date_time_impl-> year -= 1900;
     return AXIS2_SUCCESS;
 }
@@ -263,7 +263,7 @@
 axis2_date_time_set_date_time(axis2_date_time_t* date_time,
         const axis2_env_t *env,
         int year, int month, int day,
-        int hour, int min, int second)
+        int hour, int min, int second,int milliseconds)
 {
     axis2_date_time_impl_t *date_time_impl = NULL;
 
@@ -277,6 +277,8 @@
     if (hour > -1)date_time_impl-> hour = hour;
     if (min > -1)date_time_impl-> min = min;
     if (second > -1)date_time_impl-> sec = second;
+    if (second > -1)date_time_impl-> msec = milliseconds;
+
     return AXIS2_SUCCESS;
 }
 
@@ -293,7 +295,7 @@
 
     time_str = (char*)AXIS2_MALLOC(env->allocator, sizeof(char) * 32);
 
-    sprintf(time_str, "%d:%d:%dZ" , date_time_impl-> hour, date_time_impl-> min, date_time_impl-> sec);
+    sprintf(time_str, "%d:%d:%d:%dZ" , date_time_impl-> hour, date_time_impl-> min, date_time_impl-> sec,date_time_impl-> msec);
     return time_str;
 }
 
@@ -327,9 +329,9 @@
     date_time_impl = AXIS2_INTF_TO_IMPL(date_time);
 
     date_time_str = AXIS2_MALLOC(env-> allocator, sizeof(char) * 32);
-    sprintf(date_time_str, "%d-%02d-%02dT%02d:%02d:%02dZ" , date_time_impl-> year + 1900,
+    sprintf(date_time_str, "%d-%02d-%02dT%02d:%02d:%02d:%02dZ" , date_time_impl-> year + 1900,
             date_time_impl-> mon + 1, date_time_impl-> day, date_time_impl-> hour, date_time_impl-> min,
-            date_time_impl-> sec);
+            date_time_impl-> sec,date_time_impl-> msec);
     return date_time_str;
 }
 

Modified: webservices/axis2/trunk/c/util/src/platforms/unix/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/platforms/unix/Makefile.am?view=diff&rev=483837&r1=483836&r2=483837
==============================================================================
--- webservices/axis2/trunk/c/util/src/platforms/unix/Makefile.am (original)
+++ webservices/axis2/trunk/c/util/src/platforms/unix/Makefile.am Thu Dec  7 21:28:21 2006
@@ -1,7 +1,7 @@
 noinst_LTLIBRARIES = libaxis2_unix.la
 
 libaxis2_unix_la_SOURCES = uuid_gen_unix.c\
-                           thread_unix.c
+                           thread_unix.c date_time_util_unix.c 
 
 INCLUDES = -I$(top_builddir)/include \
            -I$(top_builddir)/include/platforms \



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org