Hi Dean,

From last report it looks like Mono team will only be supporting and 
implementing the "Silverlight Subset" of WCF so you'll have to wait till you 
hear back from them to figure out if what you're trying to do falls within that 
subset.

Although I'm the maintainer of WCF replacement web services stack called 
http://www.servicestack.net which I currently support on Mono and now recently 
on MonoTouch. Since it's open source and I'm able to control the entire source 
code, it's much easier for me to support and add functionality.

It's both an RPC/SOAP and REST convention-based web services framework that is 
configuration-free so is easy to setup. If you're interested I have a 
preconfigured MonoTouch client application that uses it available here:

https://github.com/ServiceStack/ServiceStack.Examples/tree/master/src/MonoTouch/RestFilesClient

The project includes all the dependencies you need and has examples of both 
sync and async clients (both with 1 LOC):

//calling sync web service
var response = gateway.Get<FilesResponse>(txtPath.Text);

//calling async web service
gateway.GetAsync<FilesResponse>(txtPath.Text, 
        r => InvokeOnMainThread(() => txtResults.Text = r.Dump()), 
        null);

There's no code-gen as the same DTO classes you use to define your web services 
on the server can be used as-is in your client application to provide a 
strongly-typed client with an easy and friction-free development workflow.
As a bonus it uses my fast Json Serializer which the latest benchmarks places 
it a multitude of times faster than any serializer shipping with .NET.

If you don't mind binary protocols, protobuf-net remains the fastest serializer 
for .NET and also includes an RPC-based framework. Having spoken with the 
author, one of his goals was to support MonoTouch although I'm not sure what 
the current status on MonoTouch is at the moment.

Anyway if you decide to try servicetack.net feel free to post any 
questions/issues you have to the group:
https://groups.google.com/forum/#!forum/servicestack

Cheers,
Demis


On 24 Aug 2011, at 08:10, Dean Harry wrote:

> Hey Demis,
>  
> I took your advice and went the WCF path… seems a much better way to do 
> things.
>  
> I still have a problem though…
>  
> I created a VERY simple service at 
> http://hotdogs.infocore.com.au/hotdogs/Service1.svc, it works fine in VS 2010 
> but doesn’t work in MT, I have just exhausted my limited knowledge on trying 
> to figure it out, with no success…
>  
> I added it as a WCF web reference called hdService and then have the 
> following:
>  
> hdService.ServiceClient client = new hdService.ServiceClient();
> Console.Writeline(client.Greeting”Dean”));
>  
> But it doesn’t run, keeps stopping with “Object reference not set to an 
> instance of an object” also referencing the 
> System.ServiceModel.ChannelFactory, whatever that is J
>  
> I don’t know if it me, MT, the service or what…
>  
> I’ll leave the service running, can someone try and consume it and tell me if 
> it works? Or tell me what I am missing / doing wrong?
>  
> Thanks!
> Dean
>  
>  
>  
> From: Demis Bellot [mailto:demis.bel...@gmail.com] 
> Sent: Tuesday, 23 August 2011 12:03 AM
> To: Dean Harry
> Cc: monotouch@lists.ximian.com
> Subject: Re: [MonoTouch] Web Services
>  
> Hey Dean,
>  
> Apart from the technical limitations, coupling your web services with your 
> RDBMS is generally considered bad practice. (Although I'd also argue that due 
> to its inefficiency, using SOAP in your resource constrained MonoTouch app 
> should also be avoided).
>  
> Why don't you just go the normal route and wrap your DB logic inside a 
> standard .asmx web service? though my preference would be to avoid SOAP 
> entirely and just use one of the many REST service frameworks available in 
> .NET.
>  
> If performance ever becomes a problem you can also try using my 
> http://servicestack.net web service framework, where the JSON and JSV 
> endpoints are multiple times more efficient than SOAP web services.
> 
> D.B
> Sent from my iPad
> 
> On 22 Aug 2011, at 03:32, Dean Harry <d...@callit.com.au> wrote:
> 
> Ok so I found my problem is a bug 
> (https://bugzilla.novell.com/show_bug.cgi?id=670956)
>  
> So I changed the  SqlXml class of the Reference.cs file to read, as the 
> poster mentioned at the bottom of the bug report:
>  
>    public partial class SqlXml {
>         [System.Xml.Serialization.XmlAnyElement(Namespace="Any")]
>         [System.Xml.Serialization.XmlAnyElement(Name="Any")]
>         [System.Xml.Serialization.XmlTextAttribute()]
>         public System.Xml.XmlNode Any;
>     }
> But that still doesn’t work… has anyone been able to get this to work?  I’m 
> getting desperate…
>  
> Cheers,
> Dean
>  
>  
>  
> From: monotouch-boun...@lists.ximian.com 
> [mailto:monotouch-boun...@lists.ximian.com] On Behalf Of Dean Harry
> Sent: Sunday, 21 August 2011 1:13 PM
> To: monotouch@lists.ximian.com
> Subject: [MonoTouch] Web Services
>  
> Hi All,
>  
> I am having a web service problem I can’t figure out…
>  
> I have a web service on my MSSQL server with a web method on it…
>  
> The following works fine in VS.NET but doesn’t work in Mono, now I am using 
> 2.8a but I wouldn’t have thought that anything would have changed in the web 
> services side…
>  
> The code is:
>  
> GetMeets service = new GetMeets();
> Service.Credentials = new NetworkCredentials(“username”,”password”);
>  
> It fails on the first line with:
>  
> “There was an error reflecting type ‘…..SqlXml’. Looking at the 
> InnerException is shows “There was an error reflecting field ‘Any’…. The 
> elemeny Any has been attributed with an XmlAnyElementAttribute and a 
> namespace, but no name.
>  
> Has anyone come across this before?
>  
> Cheers,
> Dean
>  
> _______________________________________________
> MonoTouch mailing list
> MonoTouch@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch

_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to