开发者

Why aren't my php moodle OK Tech webservice methods shown on my windows phone 7 project?

开发者 https://www.devze.com 2023-03-01 18:52 出处:网络
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'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:

  1. Right click on Service References and choose "Add Service Reference" (because there's no "Add Web Reference")
  2. 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 开发者_JS百科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?

0

精彩评论

暂无评论...
验证码 换一张
取 消