2

I have adapted the WCF 'Stream' sample application that is provided by Microsoft to use a Request object that is set up in a Shared Assembly and decorated with the MessageContract attributes. This should then be passed in to the UploadStreamRequest() method of the service.

The problem is that when I add a service reference to the client and try to call the method, each of the properties of the MessageContract object have just been converted to separate parameters.

I have also experimented with the 'Always generate message contracts' option within advanced settings, and although this then changes the method so that it is passed a request object, it has regenerated its own proxy representation of the object (even though I have 'Reuse types in all referenced assemblies' ticked).

Can anybody explain what I am missing here?

Many thanks

xlecoustillier
  • 16,183
  • 14
  • 60
  • 85
user1873318
  • 73
  • 1
  • 1
  • 4

1 Answers1

0

I had this problem and I have fixed it ticking the checkbox "Always generate message contracts." when I add the Service Reference.

Hope this helps.

ab_732
  • 3,639
  • 6
  • 45
  • 61