为什么我的 php mudle OK Tech Webservice 方法没有显示在我的 Windows Phone 7 项目上?
我正在为 Windows Phone 7 构建 Moodle 客户端,以了解 WP7 和 PHP 之间的互操作性。首先,我当然必须调用 Moodle 网络服务。
我已经运行了两个 Moodle 服务器,Moodle 1.9 和 Moodle 2.0。我正在使用 OK Tech Web 服务来使其与 Windows Phone 客户端配合使用,因为 Moodle 论坛上的人们都说这个 Web 服务是最好的 Web 服务之一。我已经使用 SoapUI 检查了 Web 服务,并且这些方法工作正常;我可以打电话给他们并完全收到回复消息。目前,我正在我的本地主机上进行此工作。
我尝试从我的 Windows Phone 客户端调用它。我执行了以下步骤:
- 右键单击“服务引用”并选择“添加服务引用”(因为没有“添加 Web 引用”)
- 写下地址
http://localhost:86/moodle/wspp/wsdl_pp2.php< /code> 并单击“Go”。
那里列出了这些方法,例如 login()、getAllCourses() 等,这意味着 wsdl 工作正常。因此,我将服务引用命名为 WSPP 并按“确定”。
在我的 MainPage.xaml.cs 页面上,我添加了“using MoodleClient.WSPP;”在顶部添加了一个按钮单击方法来调用 Web 服务操作。我补充道:
MoodleWSPortTypeClient mws = new MoodleWSPortTypeClient();
...但是我有点卡住了,我找不到 mws 下列出的方法。我哪里做错了?这些方法通常列在 PortTypeClient 下吗?如果没有,我该如何让这些方法发挥作用?
I'm building a Moodle client for Windows Phone 7 to learn about the interoperability between WP7 and PHP. First of all, of course I have to make a call to the Moodle webservice.
I have already got two Moodle servers running, Moodle 1.9 and Moodle 2.0. I am using the OK Tech webservice to make it work with the Windows Phone client because from the Moodle forum people are saying that this webservice is one of the best. I have checked the webservice using SoapUI and the methods are working fine; I could call them and got the response message completely well. For now, I am working on it on my localhost.
I tried to call it from my Windows Phone client. I did these steps:
- Right click on Service References and choose "Add Service Reference" (because there's no "Add Web Reference")
- Write down the address
http://localhost:86/moodle/wspp/wsdl_pp2.php
and clicked Go.
The methods are listed there, like login(), getAllCourses(), etc. which means the wsdl is working fine. So I named the service reference as WSPP and pressed OK.
On my MainPage.xaml.cs page I added "using MoodleClient.WSPP;" on top and added a button click method to call a webservice operation. I added:
MoodleWSPortTypeClient mws = new MoodleWSPortTypeClient();
...but then I'm kind of stuck, I could not find the methods listed under mws. Where did I go wrong? Are the methods normally listed under PortTypeClient? If not, how do I get the methods to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论