使用WSDL异步操作 [英] Using WSDL Async operations
本文介绍了使用WSDL异步操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试做一个基本的hello world调用,在WP7中我有一个HelloWorldCompleted但它似乎不存在于metro中,我看不到如何捕获完成的回调
I am trying to do a basic hello world call, in WP7 I had a HelloWorldCompleted but it does not seem to exist in metro, I don't see how to catch the completed callback
MySvcSoapClient ts =
new MySvcSoapClient ();
任务 helloworld = ts.HelloWorldAsync( );
MySvcSoapClientts =
newMySvcSoapClient();
Taskhelloworld = ts.HelloWorldAsync();
Ed,
推荐答案
您好GenCode
您可以通过以下方法获得结果
HelloWorldRequest req = new HelloWorldRequest();
req.Body = new HelloWorldRequestBody() ; $
urserviceclass client = new urserviceclass(); //无论你在服务中给出的名字是什么?
HelloWorldResponse res = await client.HelloWorldAsync();
&n bsp; string s = res.Body.HelloWorldResult;
Hi GenCode
You can get the result by following Method
HelloWorldRequest req = new HelloWorldRequest();
req.Body = new HelloWorldRequestBody();
urserviceclass client = new urserviceclass();// Whatever u given the name in service
HelloWorldResponse res =await client.HelloWorldAsync();
string s = res.Body.HelloWorldResult;
这篇关于使用WSDL异步操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文