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
47 lines (39 loc) · 1.48 KB
/
Soap11ServiceClient.cs
File metadata and controls
47 lines (39 loc) · 1.48 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
#if !(SL5 || XBOX || ANDROID || __IOS__ || __MAC__|| PCL || NETSTANDARD1_1 || NETSTANDARD2_0)
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 => this.BasicHttpBinding;
protected override System.ServiceModel.Channels.MessageVersion MessageVersion => 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