How to control expose data/message contracts using WSSF?

Topics: General Discussion Forum, July and December Releases Forum, Service Factory Modeling Edition Forum
Sep 25, 2009 at 4:46 PM

Hi All,

I am facing a strange problem when creating WCF services using WSSF tool.

I have created a Message Contract which has 2 data contracts and this message contract is my input to one of my service operation.

When I added the WCF service on the client side the service operation is exposed in one of the 2 ways as below.

1. MessageRespose TestWCFOpeartion(MessageRequest);

2. MessageRespose TestWCFOpeartion(dataContract1,dataContract2 );

Here MessageRequest is WCF Message Contract which has wrapped dataContract1, dataContract2.

How to control the signature of the service operation using WSSF when using in the client side?

Is it a known issue?

Thanks,

Srinivas Akella

 

 

 

 

Developer
Sep 28, 2009 at 12:13 PM

Hi Srinivas,

Some time ago someone post this thread with a suggestion about making sure that ALL message contracts were wrapped (setting Wrapped property as true) regardless of parameter count.

Perhaps that might solve your proxy issue.

PS: Some other links: http://servicefactory.codeplex.com/Thread/View.aspx?ThreadId=30035, http://servicefactory.codeplex.com/Thread/View.aspx?ThreadId=19790

Sep 28, 2009 at 5:14 PM

Hi Hernan,

I have already set IsWrapped property to true for all my message contracts. Still the operation contract is exposed with data contracts as parameters.

The proxy generation is anywhere dependent on the System/Machine where the service is hosted?

Thanks,

Srinivas Akella

Developer
Sep 28, 2009 at 6:20 PM

Ok so I assume that your already set all your MC (In and Out) with IsWrapped = true.

If that's the case, then cross check that your proxy type has both overloads (with DC args and MC args). If that's not the case, then you can do a couple of things.

1) Use VS IDE to generated the proxy where you can set in advanced settings the MC generation, or

2) Create your own proxy class for maxumum control over the proxy and derive from ClientBase<T> or use something like the generic proxy in this thread (6th post).

Oct 1, 2009 at 6:26 PM

Thanks Hernan,

Its working fine.