chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1085085 - in /chemistry/dotcmis/trunk/DotCMIS: binding/webservices/webservices.cs const.cs
Date Thu, 24 Mar 2011 19:22:01 GMT
Author: fmui
Date: Thu Mar 24 19:22:00 2011
New Revision: 1085085

URL: http://svn.apache.org/viewvc?rev=1085085&view=rev
Log:
- added web services timeout settings

Modified:
    chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs
    chemistry/dotcmis/trunk/DotCMIS/const.cs

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs?rev=1085085&r1=1085084&r2=1085085&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs Thu Mar 24 19:22:00
2011
@@ -233,7 +233,7 @@ namespace DotCMIS.Binding.WebServices
                 SecurityBindingElement securityElement = SecurityBindingElement.CreateUserNameOverTransportBindingElement();
                 securityElement.SecurityHeaderLayout = SecurityHeaderLayout.LaxTimestampFirst;
 
-                string enableUnsecuredResponseFlag = session.GetValue(SessionParameter.EnableUnsecuredResponse)
as string;
+                string enableUnsecuredResponseFlag = session.GetValue(SessionParameter.WebServicesEnableUnsecuredResponse)
as string;
                 if (enableUnsecuredResponseFlag != null && enableUnsecuredResponseFlag.ToLower().Equals("true"))
                 {
                     PropertyInfo eur = securityElement.GetType().GetProperty("EnableUnsecuredResponse");
@@ -256,6 +256,30 @@ namespace DotCMIS.Binding.WebServices
                 elements.Add(transportElement);
 
                 binding = new CustomBinding(elements);
+
+                string openTimeOut = session.GetValue(SessionParameter.WebServicesOpenTimeout)
as string;
+                if (openTimeOut != null)
+                {
+                    binding.OpenTimeout = TimeSpan.Parse(openTimeOut);
+                }
+
+                string closeTimeOut = session.GetValue(SessionParameter.WebServicesCloseTimeout)
as string;
+                if (closeTimeOut != null)
+                {
+                    binding.CloseTimeout = TimeSpan.Parse(closeTimeOut);
+                }
+
+                string sendTimeOut = session.GetValue(SessionParameter.WebServicesSendTimeout)
as string;
+                if (sendTimeOut != null)
+                {
+                    binding.SendTimeout = TimeSpan.Parse(sendTimeOut);
+                }
+
+                string receiveTimeOut = session.GetValue(SessionParameter.WebServicesReceiveTimeout)
as string;
+                if (receiveTimeOut != null)
+                {
+                    binding.ReceiveTimeout = TimeSpan.Parse(receiveTimeOut);
+                }
             }
 
             if (serviceKey == SessionParameter.WebServicesRepositoryService)

Modified: chemistry/dotcmis/trunk/DotCMIS/const.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/const.cs?rev=1085085&r1=1085084&r2=1085085&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/const.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/const.cs Thu Mar 24 19:22:00 2011
@@ -47,7 +47,12 @@ namespace DotCMIS
         public const string WebServicesAclService = "org.apache.chemistry.dotcmis.binding.webservices.ACLService";
 
         public const string WebServicesWCFBinding = "org.apache.chemistry.dotcmis.binding.webservices.wcfbinding";
-        public const string EnableUnsecuredResponse = "org.apache.chemistry.dotcmis.binding.webservices.enableUnsecuredResponse";
// requires hotfix 971493 or the .NET framework 4 
+        public const string WebServicesOpenTimeout = "org.apache.chemistry.dotcmis.binding.webservices.openTimeout";
+        public const string WebServicesCloseTimeout = "org.apache.chemistry.dotcmis.binding.webservices.closeTimeout";
+        public const string WebServicesSendTimeout = "org.apache.chemistry.dotcmis.binding.webservices.sendTimeout";
+        public const string WebServicesReceiveTimeout = "org.apache.chemistry.dotcmis.binding.webservices.receiveTimeout";
+
+        public const string WebServicesEnableUnsecuredResponse = "org.apache.chemistry.dotcmis.binding.webservices.enableUnsecuredResponse";
// requires hotfix 971493 or the .NET framework 4 
 
         // authentication provider
         public const string AuthenticationProviderClass = "org.apache.chemistry.dotcmis.binding.auth.classname";



Mime
View raw message