views:

21

answers:

1

Hello, I have a windows workflow foundation 4 service and a simple client . When I add the service reference in the client the visual studio don't generate a proxy class, only the interface and types

Anybody have any solution?

What should I do to work with the wf4 service properly? I need to use qhat kind of namespace and classes and contracts?

Thanks!

+2  A: 

When the client project is a workflow project type setting a service reference works a bit different. Instead of generating the standard proxy classes it generates Send & ReceiveReply activities for use on a workflow. Very nice if you are building a workflow, not so when you want to call the service using regular code.

You can either use SvcUtil manually to generate your proxy classes or use the ChannelFactory with the generated interface to create the required proxy object. The last is usually the easier option.

Maurice
I'm usign a console application as a client. I think the problem is in the wcf service genereted.I'm trying to do a workflow service like your screencast video number 6, but handling a exception like your posthttps://msmvps.com/blogs/theproblemsolver/archive/2010/03/24/workflow-4-and-soap-faults.aspx.
Murilo Lima
In that case it should just generate a proxy class for you to work with which includes both the fault and the normal message contracts. The source code for the blog post is attached to the post so you can compare your projects with mine.
Maurice
I found the problem, the .csproject of the console application have aProjectTypeGuids section wich include the guid of a workflow application, so the service reference works like you said before.
Murilo Lima
Right, that means that the Add Service Reverence dialog considers it a WF project and does the WF thing. I would much prefer if it still generated the original proxy as well but this is what we got.
Maurice