Silverlight 和 Windows 工作流基础 [英] Silverlight and Windows Workflow Foundation

查看:27
本文介绍了Silverlight 和 Windows 工作流基础的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 private void btnUpdate_Click(object sender, RoutedEventArgs e)
 {
     xxxxxxx.Workflow1_WebServiceSoapClient zer = new xxxxx.Workflow1_WebServiceSoapClient();
     zer.demanderSubmitReportCompleted += new EventHandler<xxxxxxxxxxxxxxx.demanderSubmitReportCompletedEventArgs>(service2);
     zer.demanderSubmitReportAsync("zzz", 20000);
 }

public void service2(object sender, xxxxx.demanderSubmitReportCompletedEventArgs e)
{
    string a = e.Result;
}

我正在尝试调用从 Silverlight 项目发布为 Web 服务的 Windows Workflow Foundation.当我从控制台应用程序调用它时,它工作正常,因为我可以添加一个 Web 引用,然后我只需创建该 Web 服务的一个实例,然后调用我想要的方法.问题出在 Silverlight 项目中,因为我可以只添加一个服务引用,所以我发现自己正在处理根本不起作用的 SOAP 内容,这是代码错误:

I'm trying to call a Windows Workflow Foundation published as a web service from a Silverlight project. When I call it from a console application it works fine because I can add a web reference then I just make an instance of that webservice then I invoke the method I want. The problem is in the Silverlight project because I can just add a service reference so I find myself working with SOAP stuff that doesn't work at all, and here is the code error:

这是代码:我用英文稍微改了一下.

Here is the code: I change it a litle bit in English.

Error in exécution Microsoft JScript: Unhandled Error in Silverlight Application  exception happened in the operation, résult not valide. Consult InnerException for more information.   in System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   in AEDSilverlightIntegrated.ServiceReference2.demanderSubmitReportCompletedEventArgs.get_Result()
   in AEDSilverlightIntegrated.SilverEntryAedHeaderNew.mmm_demanderSubmitReportCompleted(Object sender, demanderSubmitReportCompletedEventArgs e)
   in AEDSilverlightIntegrated.ServiceReference2.Workflow1_WebServiceSoapClient.OndemanderSubmitReportCompleted(Object state)

推荐答案

好吧,我找到了一个解决方案,我想与大家分享.解决方案是构建一个 Web 服务,作为作为 Web 服务发布的 Windows Workflow Foundation 和 Silverlight 应用程序之间的桥梁.不是那么天才,但这解决了问题.

Well, I found a solution and I want to share it with all of you. The solution is to build a web service that works as a bridge between Windows Workflow Foundation published as a web service and a Silverlight application. Not so genious, but this resolve the problem.

这篇关于Silverlight 和 Windows 工作流基础的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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