chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1083214 - in /chemistry/dotcmis/trunk/DotCMIS: binding/webservices/webservices.cs const.cs
Date Sat, 19 Mar 2011 16:35:53 GMT
Author: fmui
Date: Sat Mar 19 16:35:53 2011
New Revision: 1083214

URL: http://svn.apache.org/viewvc?rev=1083214&view=rev
Log:
- added EnableUnsecuredResponse flag

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=1083214&r1=1083213&r2=1083214&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs Sat Mar 19 16:35:53
2011
@@ -27,6 +27,7 @@ using DotCMIS.Data.Extensions;
 using DotCMIS.Exceptions;
 using DotCMIS.Enums;
 using System.ServiceModel.Channels;
+using System.Reflection;
 
 namespace DotCMIS.Binding.WebServices
 {
@@ -231,7 +232,18 @@ namespace DotCMIS.Binding.WebServices
 
                 SecurityBindingElement securityElement = SecurityBindingElement.CreateUserNameOverTransportBindingElement();
                 securityElement.SecurityHeaderLayout = SecurityHeaderLayout.LaxTimestampFirst;
-                //securityElement.IncludeTimestamp = false;
+
+                string enableUnsecuredResponseFlag = session.GetValue(SessionParameter.EnableUnsecuredResponse)
as string;
+                if (enableUnsecuredResponseFlag != null && enableUnsecuredResponseFlag.ToLower().Equals("true"))
+                {
+                    securityElement.EnableUnsecuredResponse = true;
+                    PropertyInfo eur = securityElement.GetType().GetProperty("EnableUnsecuredResponse");
+                    if (eur != null)
+                    {
+                        eur.GetSetMethod().Invoke(securityElement, new object[] { true });
+                    }
+                }
+
                 elements.Add(securityElement);
 
                 MtomMessageEncodingBindingElement mtomElement = new MtomMessageEncodingBindingElement();

Modified: chemistry/dotcmis/trunk/DotCMIS/const.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/const.cs?rev=1083214&r1=1083213&r2=1083214&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/const.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/const.cs Sat Mar 19 16:35:53 2011
@@ -51,6 +51,7 @@ 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 
 
         // authentication provider
         public const string AuthenticationProviderClass = "org.apache.chemistry.dotcmis.binding.auth.classname";



Mime
View raw message