Hi,
We used silverlight's slsvcutil to build "an async-style WCF
interface" file for our iOS app.
// This code was auto-generated by slsvcutil, version 4.0.50826.0
We also used an earlier version 3 to do the same thing to see if we
could resolve the problems we're seeing. Same problems occur.
We wrote some code to use the module to chat with our web service.
The relevant section from a small iOS test app is below.
This code works to a point. We usually succeed in receiving an answer
from our inquiries, but sometimes we don't, and when we don't receive
one, we eventually time out and exception.
Based on the server logs, we believe the server is reliably
responding to all of the requests, but that the client on the iOS
side isn't seeing/getting all the responses.
Is there something glaringly obvious we're missing that you can see
in the snippet below?
We've tried building against versions of MonoTouch: 3.2.6, 4.0.1, 4.0.2, 4.0.3.
Thanks,
-Mike
EndpointAddress _address = new
EndpointAddress("http://ws.ourfancydomain.net/Web.AsyncServices/AuroraWcfAsync.svc");
BasicHttpBinding _binding = new BasicHttpBinding();
partial void btnClearTest_1_Onclick (UIButton sender)
{
Console.WriteLine(System.DateTime.Now.ToString("hh:mm:ss.fffffff") +
" GetBrokers_OnClick()");
txtResults.Text
+= "btnTest_1_Onclick()" + System.Environment.NewLine;
p_client
= new AuroraWcfAsyncClient(_binding, _address);
((IAuroraWcfAsync)p_client).BeginGetSquareRoot(12D * 12D,
GetSquareRootCompleted, "Cats");
}
void GetSquareRootCompleted(IAsyncResult asyncResult) {
this.InvokeOnMainThread (delegate() {
Console.WriteLine(System.DateTime.Now.ToString("hh:mm:ss.fffffff")
+ " GetBrokersCompleted()");
try {
string results
=
((IAuroraWcfAsync)p_client).EndGetSquareRoot(asyncResult).ToString() +
" " + asyncResult.AsyncState +
System.Environment.NewLine;
txtResults.Text += results;
Console.WriteLine(results);
} catch (Exception ex) {
txtResults.Text
+= "ERROR: " + ex.Message +
System.Environment.NewLine;
if (ex.InnerException != null)
txtResults.Text
+= " : " +
ex.InnerException.Message + System.Environment.NewLine;
Console.WriteLine("ERROR: " + ex.Message);
if (ex.InnerException != null)
Console.WriteLine(" : " +
ex.InnerException.Message);
Console.WriteLine(" TYPE: " + asyncResult.GetType());
}
p_client.Close();
});
}
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch