新人报道:在mobile模拟器下访问webservice的问题

superymk 2007-03-02 07:07:04
现在遇到了两个问题,一个是在PocketPC 2003 Second Edition上访问自己建立的webservice 出了以下exception
位于 System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke()
位于 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke()
at LoginRegister.Login()<-------这个是我写的webservice中的方法
位于 UniSmartGUI.Login.LoginForm.btnOK_Click()
位于 System.Windows.Forms.Control.OnClick()
位于 System.Windows.Forms.Button.OnClick()
位于 System.Windows.Forms.ButtonBase.WnProc()
位于 System.Windows.Forms.Control._InternalWnProc()
位于 Microsoft.AGL.Forms.EVL.EnterMainLoop()
位于 System.Windows.Forms.Application.Run()
位于 UniSmartMobile.Program.Main()

我已经用ActiveSync连接上了,模拟器也调了设置,启动后插在底座上(cradle)
然后webservice的ip也是我自己的ip了,不是localhost或者127.0.0.1,只是出异常的类是我用wsdl/sharetypes生成的,然后在编译时把所有编译出错误的地方注释掉了。

还有就是关于wsdl/sharetypes的问题,我现在想把该服务用于mobile设备,而服务器其中有的类是公用的,我不想自己写代码编码公用的自定义对象,因为对服务器端回改动很大,所以请大家帮忙解决下怎样才能在mobile端使用上wsdl/sharetypes出来的代码
...全文
378 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
purexiafeng 2007-03-23
  • 打赏
  • 举报
回复
加一句话试试,如下

WebReference.Service pdaWS = new WebReference.Service();

pdaWS.Url = "http://192.168.1.146/Pda_service/Service.asmx";

MessageBox.Show(pdaWS.HelloWorld());
superymk 2007-03-03
  • 打赏
  • 举报
回复
就是对这句话的调用出的上述exception
return this.BeginInvoke("Login", new object[] {
username,
password,
device}, callback, asyncState);
这个我是用wsdl/sharetypes生成的,然后放到mobile的客户端,将所有编译不过的地方注释掉出现的
superymk 2007-03-02
  • 打赏
  • 举报
回复
就是在模拟器上抛出WebException

位于 System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke()
位于 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke()
at LoginRegister.Login()<-------这个是我写的webservice中的方法
位于 UniSmartGUI.Login.LoginForm.btnOK_Click()
位于 System.Windows.Forms.Control.OnClick()
位于 System.Windows.Forms.Button.OnClick()
位于 System.Windows.Forms.ButtonBase.WnProc()
位于 System.Windows.Forms.Control._InternalWnProc()
位于 Microsoft.AGL.Forms.EVL.EnterMainLoop()
位于 System.Windows.Forms.Application.Run()
位于 UniSmartMobile.Program.Main()
cangwu_lee 2007-03-02
  • 打赏
  • 举报
回复
什么错误信息。 说了半天,没有说什么错误的。



————————————————————————————————————
写作,虽然每个人都会查阅辞海,可,不是人人都能写出不朽的篇章的。编程,如是也。

7,655

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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