WebService - C# - Windows Phone

WebService - C# - Windows Phone

by Evaldo Cardoso -
Number of replies: 1

I'm a student and 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 2.0 and Moodle 2.1. 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 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?

Average of ratings: -
In reply to Evaldo Cardoso

Re: WebService - C# - Windows Phone

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Why 2.0 or 2.1? We are up to 2.5, and that is much better. In particular there have been significant fixes to the SOAP web service system.