如何消费SOAP Web服务,并在我的Windows Phone应用程序显示的数据 [英] how to consume a soap web service and display the data in my windows phone application

查看:88
本文介绍了如何消费SOAP Web服务,并在我的Windows Phone应用程序显示的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立我的Windows应用程序的第一个应用。我的要求是觉得─在点击一个按钮,我想导航到另一个页面,在该页面我想要将数据直接从SOAP Web服务也通过执行XML解析显示出来。

I am building my first app for windows application. My requirement is that- On clicking a button i want to navigate to another page and in that page i want the data to be displayed directly from a soap web service also by performing xml parsing.

按钮事件code:

private void button1_Click(object sender, RoutedEventArgs e)
{
    KejriwalService.arvindSoapClient client = new KejriwalService.arvindSoapClient();
    client.getarvindNewsCompleted += new EventHandler<KejriwalService.getarvindNewsCompletedEventArgs>(client_getarvindNewsCompleted);
}

void client_getarvindNewsCompleted(object sender, KejriwalService.getarvindNewsCompletedEventArgs e)
{
    textBlock1.Text = e.Result.ToString();
}

我没有收到从这里的任何结果。任何人都可以请帮助。我想提取3文本字段和1图像从这个Web方法

I am not getting any result from here. Can anyone please help. I want to extract 3 text fields and 1 image from this web method

推荐答案

只是检查你的web服务。您的code是完美的,但你需要改变你的Web服务。 DONOT从Web方法返回的字符串,但返回XML

Just check your web service. Your code is perfect but you need to change your web service. Donot return string from your web method but return the xml

这篇关于如何消费SOAP Web服务,并在我的Windows Phone应用程序显示的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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