markus / MarkupToPDF / Common / GetUserSign.cs @ d251456f
이력 | 보기 | 이력해설 | 다운로드 (1.61 KB)
1 | 787a4489 | KangIngu | using KCOMDataModel.Common; |
---|---|---|---|
2 | using KCOMDataModel.DataModel; |
||
3 | using System; |
||
4 | using System.Collections.Generic; |
||
5 | using System.IO; |
||
6 | using System.Linq; |
||
7 | 2aac9b2b | djkim | using System.ServiceModel; |
8 | 787a4489 | KangIngu | using System.Text; |
9 | |||
10 | namespace MarkupToPDF.Common |
||
11 | { |
||
12 | public class GetUserSign |
||
13 | { |
||
14 | 2aac9b2b | djkim | public BasicHttpBinding _binding; |
15 | public EndpointAddress _EndPoint; |
||
16 | c247e6b4 | humkyung | /// <summary> |
17 | /// get signature of given user of given project |
||
18 | /// </summary> |
||
19 | /// <param name="UserID"></param> |
||
20 | /// <param name="ProjectNo"></param> |
||
21 | /// <returns></returns> |
||
22 | 787a4489 | KangIngu | public string GetSign(string UserID, string ProjectNo) |
23 | { |
||
24 | 2aac9b2b | djkim | |
25 | _binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly); |
||
26 | _binding.MaxBufferSize = 2147483647; |
||
27 | _binding.MaxReceivedMessageSize = 2147483647; |
||
28 | _binding.OpenTimeout = new TimeSpan(0, 1, 0); |
||
29 | _binding.ReceiveTimeout = new TimeSpan(0, 10, 0); |
||
30 | _binding.CloseTimeout = new TimeSpan(0, 5, 0); |
||
31 | _binding.SendTimeout = new TimeSpan(0, 5, 0); |
||
32 | _binding.TextEncoding = System.Text.Encoding.UTF8; |
||
33 | _binding.TransferMode = TransferMode.Buffered; |
||
34 | c247e6b4 | humkyung | |
35 | 2aac9b2b | djkim | string sBaseServiceURL = global::MarkupToPDF.Properties.Settings.Default.BaseClientAddress; |
36 | _EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", sBaseServiceURL)); |
||
37 | |||
38 | markus_api.ServiceDeepViewClient client = new markus_api.ServiceDeepViewClient(_binding, _EndPoint); |
||
39 | var _sign = client.GetSignData(ProjectNo, UserID); |
||
40 | |||
41 | return _sign; |
||
42 | 787a4489 | KangIngu | } |
43 | } |
||
44 | } |