Bug 7480 - Proxy generated by Slsvcutil.exe (ClientBase) does not deserialize complex objects properly (null)
Summary: Proxy generated by Slsvcutil.exe (ClientBase) does not deserialize complex ob...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web.Services ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-09-26 15:11 UTC by Bryan Moulton
Modified: 2012-09-29 18:03 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

SampleProblemCode (10.08 KB, application/zip)
2012-09-26 15:11 UTC, Bryan Moulton

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 7480 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Bryan Moulton 2012-09-26 15:11:29 UTC
Created attachment 2626 [details]

-=From Tom Smith=-

Basically the 'objects' which are passed back (as params) from the webservice methods ALWAYS appear to be null.

Similiar code on the WP7 platform functions as expected, as does other clients consuming the service. We have determined (using Wireshark) that a properly formatted request is being sent, and that a proper reply is being returned, but that it seems MonoTouch doesn't appear to get that (or perhaps I just haven't a clue). 

To help make things as simple as possible, I threw together a quick simple web service for us to test with and attached it as a zip file containing the following:

1) MonoTestClientCode :: This is the test MonoTouch iPhone code which fails when I try to access the contents of the method's return parameter 'pContact'
2) TestWebServiceCodeRunningInIIS7 :: This is the test web service which the above tries to consume

Here are some additional details which may help:

Version Info

- MonoDevelop:
- Xcode: 4.4.1
- MonoTouch 5.4.0

Other notes

a) The test client code fails when trying to access the method's return parameter msg = e.pContact with a Null exception msg
b) The method's return value is correct: msg = e.result
c) The proxy code 'ContactService.cs' was generated using SLSvcutil v3.0 (also tried v4.0 with same results)
d) I tried using both OUT and REF keywords in the web service and client code, but same results
e) Using the same proxy code, all works as expected on the WP7 platform

<Can you try generating a new web reference from MonoDevelop?>

Well that does work and returns the objects from the parameter list as expected, however,,, the issue now is that we lose the ability to use the ClientCredentials class which is needed for 'Basic' Transport security. As an alternative I tried manually inserting the 'Authentication' header using the 'OperationContextScope' class, but the problem here is that there's no 'ClientBase.InnerChannel' - so no joy on that front either.
Comment 1 Zoltan Varga 2012-09-29 18:03:20 UTC
-> class libs.