juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1521309 - in /juddi/trunk/juddi-client.net/juddi-client.net: org.apache.juddi.v3.client.config/ org.apache.juddi.v3.client.crypto/ org.apache.juddi.v3.client.mapping/ org.apache.juddi.v3.client.transport/ org.apache.juddi.v3.client/
Date Mon, 09 Sep 2013 22:59:21 GMT
Author: alexoree
Date: Mon Sep  9 22:59:21 2013
New Revision: 1521309

URL: http://svn.apache.org/r1521309
Log:
JUDDI-567 adding missing files, adding IDisposable functions to .NET libraries

Added:
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.crypto/DigSigUtil.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WSDL2UDDI.cs
Modified:
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClerk.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClient.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDINode.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.transport/AspNetTransport.cs
    juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client/EventLogger.cs

Modified: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClerk.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClerk.cs?rev=1521309&r1=1521308&r2=1521309&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClerk.cs
(original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClerk.cs
Mon Sep  9 22:59:21 2013
@@ -30,7 +30,7 @@ namespace org.apache.juddi.v3.client.con
     /// 
     /// </summary>
     /// 
-    public class UDDIClerk
+    public class UDDIClerk: IDisposable
     {
 
         private Log log = LogFactory.getLog(typeof(UDDIClerk));
@@ -1016,5 +1016,10 @@ namespace org.apache.juddi.v3.client.con
         {
             return this.isEncrypted;
         }
+
+        public void Dispose()
+        {
+            uddinode.Dispose();
+        }
     }
 }

Modified: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClient.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClient.cs?rev=1521309&r1=1521308&r2=1521309&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClient.cs
(original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDIClient.cs
Mon Sep  9 22:59:21 2013
@@ -30,7 +30,7 @@ namespace org.apache.juddi.v3.client
     /// This is the entry point for most functions provide by the juddi-client.
     /// </summary>
     /// <author><a href="mailto:alexoree@apache.org">Alex O'Ree</a></author>

-    public class UDDIClient: IDisposable
+    public class UDDIClient
     {
 
         private static Log log = LogFactory.getLog(typeof(UDDIClient));

Modified: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDINode.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDINode.cs?rev=1521309&r1=1521308&r2=1521309&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDINode.cs
(original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.config/UDDINode.cs
Mon Sep  9 22:59:21 2013
@@ -25,7 +25,7 @@ namespace org.apache.juddi.v3.client.con
     /// Represents a specific UDDI server, which is the set of services defined by the specification
     /// </summary>
     /// <author><a href="mailto:alexoree@apache.org">Alex O'Ree</a></author>

-    public class UDDINode
+    public class UDDINode : IDisposable
     {
         private Properties properties;
         private Transport transport;
@@ -273,5 +273,13 @@ namespace org.apache.juddi.v3.client.con
             }
             this.properties = p;
         }
+
+        public void Dispose()
+        {
+            if (transport is IDisposable)
+            {
+                ((IDisposable)transport).Dispose();
+            }
+        }
     }
 }

Added: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.crypto/DigSigUtil.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.crypto/DigSigUtil.cs?rev=1521309&view=auto
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.crypto/DigSigUtil.cs
(added)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.crypto/DigSigUtil.cs
Mon Sep  9 22:59:21 2013
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace org.apache.juddi.client.org.apache.juddi.v3.client.crypto
+{
+    /// <summary>
+    /// A utility class for signing and verifying JAXB Objects, such as UDDI  entities. 
 
+    /// Notes: This class only supports elements that are signed once. 
+    /// Multiple signature are not currently supported.
+    /// </summary>
+    /// <author><a href="mailto:alexoree@apache.org">Alex O'Ree</a></author>

+    public class DigSigUtil
+    {
+        /// <summary>
+        ///
+        /// Verifies the signature on an enveloped digital signature on a UDDI
+        /// entity, such as a business, service, tmodel or binding template. <br><Br>
+        /// It is expected that either the public key of the signing certificate is
+        /// included within the signature keyinfo section OR that sufficient
+        /// information is provided in the signature to reference a public key
+        /// located within the Trust Store provided<br><Br> Optionally, this
function
+        /// also validate the signing certificate using the options provided to the
+        /// configuration map.
+
+        /// </summary>
+        /// <param name="obj"></param>
+        /// <param name="OutErrorMessage"></param>
+        /// <returns></returns>
+        public bool verifySignedUddiEntity(Object obj, out String OutErrorMessage)
+        {
+            OutErrorMessage = "";
+            return false;
+        }
+    }
+}

Added: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WSDL2UDDI.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WSDL2UDDI.cs?rev=1521309&view=auto
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WSDL2UDDI.cs
(added)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.mapping/WSDL2UDDI.cs
Mon Sep  9 22:59:21 2013
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace org.apache.juddi.v3.client.mapping
+{
+    class WSDL2UDDI
+    {
+    }
+}

Modified: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.transport/AspNetTransport.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.transport/AspNetTransport.cs?rev=1521309&r1=1521308&r2=1521309&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.transport/AspNetTransport.cs
(original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client.transport/AspNetTransport.cs
Mon Sep  9 22:59:21 2013
@@ -24,7 +24,7 @@ using System.Text;
 namespace org.apache.juddi.v3.client.transport
 {
 
-    public class AspNetTransport : Transport
+    public class AspNetTransport : Transport, IDisposable
     {//AspNetTransport 
         String nodeName = null;
         String clientName = null;
@@ -150,5 +150,16 @@ namespace org.apache.juddi.v3.client.tra
         {
             return this.custodyTransferService;
         }
+
+        public void Dispose()
+        {
+            inquiryService.Dispose();
+            securityService.Dispose();
+            publishService.Dispose();
+            subscriptionService.Dispose();
+            subscriptionListenerService.Dispose();
+            custodyTransferService.Dispose();
+            publisherService.Dispose();
+        }
     }
 }

Modified: juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client/EventLogger.cs
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client/EventLogger.cs?rev=1521309&r1=1521308&r2=1521309&view=diff
==============================================================================
--- juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client/EventLogger.cs
(original)
+++ juddi/trunk/juddi-client.net/juddi-client.net/org.apache.juddi.v3.client/EventLogger.cs
Mon Sep  9 22:59:21 2013
@@ -25,62 +25,73 @@ namespace org.apache.juddi.v3.client.log
     /// <author><a href="mailto:alexoree@apache.org">Alex O'Ree</a></author>

     public class EventLogger : Log
     {
-        EventLog log;
         LogLevel level;
         string name = "";
         public EventLogger(String name, LogLevel level)
         {
             this.level = level;
             this.name = name;
-            log = new EventLog("Application", "localhost", name);
+
         }
         public void info(string msg, Exception ex)
         {
             if (level.CompareTo(LogLevel.INFO) <= 0)
-                log.WriteEntry(DateTime.Now.ToString("o") + " INFO [" + name + "] " + msg
+ " " + LogHelper.HandleException(ex), EventLogEntryType.Information);
+                using (EventLog log = new EventLog("Application", "localhost", name))
+                {
+
+                    log.WriteEntry(DateTime.Now.ToString("o") + " INFO [" + name + "] " +
msg + " " + LogHelper.HandleException(ex), EventLogEntryType.Information);
+                }
         }
 
         public void info(string msg)
         {
             if (level.CompareTo(LogLevel.INFO) <= 0)
-                log.WriteEntry(DateTime.Now.ToString("o") + " INFO [" + name + "] " + msg,
EventLogEntryType.Information);
+                using (EventLog log = new EventLog("Application", "localhost", name))
+                    log.WriteEntry(DateTime.Now.ToString("o") + " INFO [" + name + "] " +
msg, EventLogEntryType.Information);
         }
 
         public void warn(string msg, Exception ex)
         {
             if (level.CompareTo(LogLevel.WARN) <= 0)
-                log.WriteEntry(DateTime.Now.ToString("o") + " WARN [" + name + "] " + msg
+ " " + LogHelper.HandleException(ex), EventLogEntryType.Warning);
+                using (EventLog log = new EventLog("Application", "localhost", name))
+                    log.WriteEntry(DateTime.Now.ToString("o") + " WARN [" + name + "] " +
msg + " " + LogHelper.HandleException(ex), EventLogEntryType.Warning);
         }
 
         public void warn(string msg)
         {
+
             if (level.CompareTo(LogLevel.WARN) <= 0)
-                log.WriteEntry(DateTime.Now.ToString("o") + " WARN [" + name + "] " + msg,
EventLogEntryType.Warning);
+                using (EventLog log = new EventLog("Application", "localhost", name))
+                    log.WriteEntry(DateTime.Now.ToString("o") + " WARN [" + name + "] " +
msg, EventLogEntryType.Warning);
         }
 
         public void error(string msg, Exception ex)
         {
             if (level.CompareTo(LogLevel.ERROR) <= 0)
-                log.WriteEntry(DateTime.Now.ToString("o") + " ERROR [" + name + "] " + msg
+ " " + LogHelper.HandleException(ex), EventLogEntryType.Error);
+                using (EventLog log = new EventLog("Application", "localhost", name))
+                    log.WriteEntry(DateTime.Now.ToString("o") + " ERROR [" + name + "] "
+ msg + " " + LogHelper.HandleException(ex), EventLogEntryType.Error);
         }
 
         public void error(string msg)
         {
             if (level.CompareTo(LogLevel.ERROR) <= 0)
-                log.WriteEntry(DateTime.Now.ToString("o") + " ERROR [" + name + "] " + msg,
EventLogEntryType.Error);
+                using (EventLog log = new EventLog("Application", "localhost", name))
+                    log.WriteEntry(DateTime.Now.ToString("o") + " ERROR [" + name + "] "
+ msg, EventLogEntryType.Error);
         }
 
 
         public void debug(string msg, Exception ex)
         {
             if (level.CompareTo(LogLevel.DEBUG) <= 0)
-                log.WriteEntry(DateTime.Now.ToString("o") + " DEBUG [" + name + "] " + msg
+ " " + LogHelper.HandleException(ex), EventLogEntryType.Information);
+                using (EventLog log = new EventLog("Application", "localhost", name))
+                    log.WriteEntry(DateTime.Now.ToString("o") + " DEBUG [" + name + "] "
+ msg + " " + LogHelper.HandleException(ex), EventLogEntryType.Information);
         }
 
         public void debug(string msg)
         {
             if (level.CompareTo(LogLevel.DEBUG) <= 0)
-                log.WriteEntry(DateTime.Now.ToString("o") + " DEBUG [" + name + "] " + msg,
EventLogEntryType.Information);
+                using (EventLog log = new EventLog("Application", "localhost", name))
+                    log.WriteEntry(DateTime.Now.ToString("o") + " DEBUG [" + name + "] "
+ msg, EventLogEntryType.Information);
         }
 
         public bool isDebugEnabled()
@@ -92,12 +103,10 @@ namespace org.apache.juddi.v3.client.log
         public void debug(object msg)
         {
             if (level.CompareTo(LogLevel.DEBUG) <= 0)
-                log.WriteEntry(DateTime.Now.ToString("o") + " DEBUG [" + name + "] " + msg.ToString(),
EventLogEntryType.Information);
+                using (EventLog log = new EventLog("Application", "localhost", name))
+                    log.WriteEntry(DateTime.Now.ToString("o") + " DEBUG [" + name + "] "
+ msg.ToString(), EventLogEntryType.Information);
         }
 
-        public void Dispose()
-        {
-            this.log.Dispose();
-        }
+
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message