3
using ServiceStack.Service;
6
namespace ServiceStack.ServiceClient.Web
8
#if SILVERLIGHT || MONOTOUCH || XBOX || ANDROID
10
public class Soap12ServiceClient : IServiceClient
12
public Soap12ServiceClient(string uri)
14
throw new NotImplementedException();
19
throw new NotImplementedException();
22
public void SetCredentials(string userName, string password)
24
throw new NotImplementedException();
27
public void GetAsync<TResponse>(string relativeOrAbsoluteUrl, Action<TResponse> onSuccess,
28
Action<TResponse, Exception> onError)
30
throw new NotImplementedException();
33
public void DeleteAsync<TResponse>(string relativeOrAbsoluteUrl, Action<TResponse> onSuccess,
34
Action<TResponse, Exception> onError)
36
throw new NotImplementedException();
39
public void PostAsync<TResponse>(string relativeOrAbsoluteUrl, object request,
40
Action<TResponse> onSuccess, Action<TResponse,Exception> onError)
42
throw new NotImplementedException();
45
public void PutAsync<TResponse>(string relativeOrAbsoluteUrl, object request, Action<TResponse> onSuccess,
46
Action<TResponse,Exception> onError)
48
throw new NotImplementedException();
51
public void SendAsync<TResponse>(object request, Action<TResponse> onSuccess, Action<TResponse, Exception> onError)
53
throw new NotImplementedException();
56
public void SendOneWay(object request)
58
throw new NotImplementedException();
61
public void SendOneWay(string relativeOrAbsoluteUrl, object request)
63
throw new NotImplementedException();
66
public TResponse Send<TResponse>(object request)
68
throw new NotImplementedException();
71
public TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, FileInfo fileToUpload, string mimeType)
73
throw new NotImplementedException();
76
public TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, string mimeType)
78
throw new NotImplementedException();
81
public TResponse PostFileWithRequest<TResponse>(string relativeOrAbsoluteUrl, FileInfo fileToUpload, object request)
83
throw new NotImplementedException();
86
public TResponse PostFileWithRequest<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, object request)
88
throw new NotImplementedException();
94
using System.ServiceModel;
95
using System.ServiceModel.Channels;
96
using ServiceStack.Text;
97
using ServiceStack.Service;
99
public class Soap12ServiceClient : WcfServiceClient
101
public Soap12ServiceClient(string uri)
103
this.Uri = uri.WithTrailingSlash() + "Soap12";
104
this.StoreCookies = true;
107
private WSHttpBinding binding;
109
private Binding WsHttpBinding
113
if (this.binding == null)
115
this.binding = new WSHttpBinding {
116
MaxReceivedMessageSize = int.MaxValue,
117
HostNameComparisonMode = HostNameComparisonMode.StrongWildcard,
118
MaxBufferPoolSize = 524288,
120
this.binding.Security.Mode = SecurityMode.None;
122
// Yes, you need this to manage cookies yourself. Seems counterintutive, but set to true,
123
// it only means that the framework will manage cookie propagation for the same call, which is
126
this.binding.AllowCookies = false;
132
protected override Binding Binding
134
get { return this.WsHttpBinding; }
137
protected override MessageVersion MessageVersion
139
get { return MessageVersion.Default; }
142
public override void SetProxy(Uri proxyAddress)
144
var wsHttpBinding = (WSHttpBinding)Binding;
146
wsHttpBinding.ProxyAddress = proxyAddress;
147
wsHttpBinding.UseDefaultWebProxy = false;
148
wsHttpBinding.BypassProxyOnLocal = false;