Book Image

iOS Development with Xamarin Cookbook

By : Dimitrios Tavlikos (USD)
Book Image

iOS Development with Xamarin Cookbook

By: Dimitrios Tavlikos (USD)

Overview of this book

Table of Contents (22 chapters)
iOS Development with Xamarin Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Consuming web services


In this recipe, we will learn how to use a SOAP web service in a Xamarin.iOS project.

Getting ready

Create a new Single View Application project in Xamarin Studio and name it WebServiceApp. This chapter's code contains a web service project named MTWebService. This is the web service that will be used.

To use the MTWebService web service, we need a web server. Mono Framework provides us with the XSP lightweight web server for testing purposes. Open a terminal and type the following command to get to the web service's directory, replacing <code_directory> with the path the downloaded code is in:

cd <code_directory>/CH06_code/MTWebService/MTWebService

Run the XSP web server by typing xsp4 in the prompt. You will see an output that is similar to the following:

xsp4
Listening on address: 0.0.0.0
Root directory: /Users/dtavlikos/projects/CH06_code/MTWebService/MTWebService
Listening on port: 8080 (non-secure)
Hit Return to stop the server.

The web server is now...