forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSoap11ServiceClient.cs
More file actions
53 lines (45 loc) · 1.53 KB
/
Soap11ServiceClient.cs
File metadata and controls
53 lines (45 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#if !(SL5 || XBOX || ANDROID || __IOS__ || __MAC__|| PCL)
namespace ServiceStack
{
using System;
public class Soap11ServiceClient : WcfServiceClient
{
private System.ServiceModel.BasicHttpBinding binding;
public Soap11ServiceClient(string uri)
{
this.Uri = uri.WithTrailingSlash() + "Soap11";
}
private System.ServiceModel.Channels.Binding BasicHttpBinding
{
get
{
if (this.binding == null)
{
this.binding = new System.ServiceModel.BasicHttpBinding
{
MaxReceivedMessageSize = int.MaxValue,
HostNameComparisonMode = System.ServiceModel.HostNameComparisonMode.StrongWildcard,
};
}
return this.binding;
}
}
protected override System.ServiceModel.Channels.Binding Binding
{
get { return this.BasicHttpBinding; }
}
protected override System.ServiceModel.Channels.MessageVersion MessageVersion
{
get { return this.BasicHttpBinding.MessageVersion; }
}
public override void SetProxy(Uri proxyAddress)
{
var basicBinding = (System.ServiceModel.BasicHttpBinding)Binding;
basicBinding.ProxyAddress = proxyAddress;
basicBinding.UseDefaultWebProxy = false;
basicBinding.BypassProxyOnLocal = false;
return;
}
}
}
#endif