[Mono-dev] WCF REST POST POCO, and null value

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Thu Nov 25 20:48:30 EST 2010


(2010/11/25 5:42), Joe Dluzen wrote:
> Hi all,
> I've recently been familiarizing myself with the
> System.ServiceModel.Web namespace, as I'm looking to do some WCF REST
> style development.
> I've found 2 things that appear to be bugs, and am wondering if there
> are workarounds, or if I can [attempt to] patch it.
> 1. When passing an object in the body of a POST call, I get "Unhandled
> Exception: System.NotImplementedException: parameter user is not
> contained in the URI template blah 0 0". IHello.SayHi2 in the included
> code.

Interesting. Look like (the latest?) .NET allows such a URI template 
that ignores the user parameter.

> 2. When passing null in the URI to a GET call with a named value, I
> get "Unhandled Exception: System.ArgumentException: The argument name
> value collection does not contain non-null value for 'BLAH'". However,
> when I GET in the browser, http://localhost:1337/Joe?age=1337 leaving
> off the "blah", it works fine. IHello.SayHi in the included code.
> On Win7 64, Mono 2.8.1. The code works without issue on MS.NET.

I couldn't reproduce this with our git master. It might be fixed between 
2.8 and master, but it rather looks like the request is sent to the 
SayHi  (not SayHi2) and hence blah isn't involved, so, is it really what 
you intended?

> Code:
> Shared library: http://pastebin.com/WSfiaj63
> Server: http://pastebin.com/veJ9JubX
> Client: http://pastebin.com/jniuHsiz
Can you please file a bug on bugzilla and attach them?

Atsushi Eno

More information about the Mono-devel-list mailing list