Windows Mobile调用WebService出错

allen0118 2012-08-20 10:56:40
通过Windows Mobile访问服务器上面的WebService的时候总是提示WecException,直接在PDA上面输入服务器的路径是可以访问到WebService的,但是在程序里面引用之后执行的时候
就报错了。


private void button1_Click(object sender, EventArgs e)
{
LocalService.WebService locwebser = new PPCWebServices.LocalService.WebService();
string Num1 = "3";
string Num2 = "5";
string result = locwebser.GetString(Num1, Num2);

MessageBox.Show(result);
}








执行locwebser.GetString(Num1, Num2)的时候就出错了,Windows Mobile 6.1和6.5的我都试过了,都是报一样的错误。服务器上面的WebService应该是没问题的,因为我在PC程序
里面一直都在使用。
大家看看这问题到底出在哪里呢?
...全文
162 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
馨香紫韵 2013-04-22
  • 打赏
  • 举报
回复
windows Mobile 6.5 从WCF上可以读取服务器时间但获取不了数据集??我调用WCF获取服务器上的时间成功,但获取DataSet数据集时失败,提示:未将对象引用到实例。 错误代码: /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/IService1/DownLoadAll", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [return: System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] public System.Data.DataSet DownLoadAll([System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string dtTime, [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)] string pdaCode) { object[] results = this.Invoke("DownLoadAll", new object[] { dtTime, pdaCode}); return ((System.Data.DataSet)(results[0])); } 请高手帮忙》》》 请问Windows Mobile 6.5是不是不能直接获取DataSet数据集呢》??

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧