Commits

Naethra D  committed 57337eb

Web Service file changes.

  • Participants
  • Parent commits 2b62756

Comments (0)

Files changed (2)

File Source/WebService/Web.Admin/Repositories/MerritRepository.cs

                 dataStream.Write(buffer, 0, buffer.Length);
                 dataStream.Close();
 
-                //Trace.TraceInformation("Getting Response");
+                Trace.TraceInformation("Getting Response");
 
                 httpResponse = (HttpWebResponse)httpRequest.GetResponse();
 
-                ////Trace.TraceInformation("Received Response");
+                Trace.TraceInformation("Received Response");
             }
             catch (WebException webException)
             {
                 httpResponse = (HttpWebResponse)webException.Response;
 
-                //Trace.TraceInformation("WebException with Status Code :" + httpResponse.StatusCode);
+                Trace.TraceInformation("Received WebException with Status Code :" + httpResponse.StatusCode);
 
                 if (httpResponse.StatusCode == HttpStatusCode.Unauthorized)
                 {
                 && httpResponse.StatusCode != HttpStatusCode.Unauthorized
                 && httpResponse.StatusCode != HttpStatusCode.NotFound)
             {
-                //Trace.TraceInformation("Network exception occurred.");
+                Trace.TraceInformation("Network exception occurred with Status Code : ." + httpResponse.StatusCode);
 
                 return "false|Network Exception";
                 //throw new FaultException<MerritResponseFault>(new MerritResponseFault() { Message = "Network Exception" });
             }
 
-            //Trace.TraceInformation("Getting response stream.");
+            Trace.TraceInformation("Getting response stream.");
 
             dataStream = httpResponse.GetResponseStream();
             reader = new StreamReader(dataStream);
             dataStream.Close();
             httpResponse.Close();
 
-            //Trace.TraceInformation("Actual Response as string : " + restResponse);
-
             // Get Identifier from the response.
             return "true|" + restResponse.Substring(restResponse.IndexOf("ark:")).Trim();
         }

File Source/WebService/Web.Admin/RepositoryService.svc.cs

         [WebInvoke(Method = "POST")]
         public string GetIdentifier()
         {
-            //Trace.TraceInformation("Get identifier called");
+            Trace.TraceInformation("Get identifier called");
 
             string queryDataString = HttpContext.Current.Request["QueryData"];
             string repositoryModelString = HttpContext.Current.Request["RepositoryModel"];
                 IRepositoryDetailsDB _repositoryDetailsDB = new RepositoryDetailsDB(new DCXLAdminEntities());
                 var repository = _repositoryDetailsDB.GetRespositories().FirstOrDefault(r => string.Compare(r.RepositoryName, repositoryModel.RepositoryName, true) == 0);
 
-                // Get Authorisation for ONEShare repositoryType.
+                // Get Authorization for ONEShare repositoryType.
                 if (repository != null)
                 {
-                    //Trace.TraceInformation("Repository Name :" + repositoryModel.RepositoryName);
                     IRepository instance = RepositoryFactory.GetRepositoryInstance(repositoryModel.RepositoryName);
                     repositoryModel.RepositoryUrl = repository.GetIdentifierUrl;
 
 
                     if (instance != null)
                     {
-                        //Trace.TraceInformation("Calling GetIdentifier on Repository");
+                        Trace.TraceInformation("Calling GetIdentifier on Repository");
                         string returnValue = instance.GetIdentifier(queryData, repositoryModel);
-                        //Trace.TraceInformation("Returning value from service : " + returnValue);
+                        Trace.TraceInformation("Returning value from service : " + returnValue);
                             return returnValue;
                     }
                 }