无法使WCF在WF中工作 [英] Can't get WCF working in WF

查看:67
本文介绍了无法使WCF在WF中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在旧的" WF3.5工作流程中,我们使用SendActivity调用了一些Web服务,效果很好.目前,我们正在迁移到WF4,但无法正常工作.我的新SendAndReceiveReply活动遇到了几个问题.

假设我们必须学习以下课程:

Hi everybody,

In our "old" WF3.5 workflows we invoke some web services using the SendActivity this works fine. At this moment we're in the migration to WF4 but can't get this working. I've several issues with the new SendAndReceiveReply activity.

Assume we have to following class:

[ServiceContract]
public class IMyService
{
    [OperationContract]
    void SwitchPower(bool powerOn);
}

推荐答案

可以尝试添加服务参考吗?

在工作流项目中添加服务参考会自动生成 proxy 活动,您可以直接使用它们来访问工作流程中的服务.详细信息被封装在自定义活动中,工作流作者可以专注于业务逻辑.

您还可以窥视生成的代码,然后在此处查看正确的配置.

希望对您有所帮助,
Andrew
Can you try Add Service Reference?

Adding a service reference in a workflow project will automatically generate proxy activities that you can use directly to access a service in a workflow. The details are encapsulated within the custom activity and the workflow author can focus on the business logic.

You can also peep into the generated code and look at the right configuration there.

Hope it helps,
Andrew


这篇关于无法使WCF在WF中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆