Home > Uncategorized > Web services with PHP (NuSOAP) & C# Mobile Client

Web services with PHP (NuSOAP) & C# Mobile Client

Hello,
The blog is about how to create web services ? how to make use of those services
by having a mobile client as consumer of those services.

Hoping to start with that reader understand web service if not why not to read it
from here -> http://en.wikipedia.org/wiki/Web_service

Ok hoping! that reader understand about web service and wanted to know how
to create one yet with this simple NuSOAP lib in PHP.
More information about NuSOAP is available here.
-> http://www.scottnichol.com/nusoapintro.htm

After downloading the NuSOAP lib from here
-> http://sourceforge.net/projects/nusoap/
extract it to a place easily remembered path, to later include in your web service.
! Remember to include SOAP in php.ini file.

Soo, here we go on the code part directly. Hey but i forgot to mention my scenario
I have J2SE application collecting information from sensors. The idea is that mobile client can view the selected sensor information. By having web serivce it was really easy to process the request via SOAP/WSDL.

Well the code Part is yet so simple that it doesn’t need any explanation.
=======================================================

webservices.php

save this in your web directory with somename.php The things happen now is that the web service is ready. Now i will go to the mobile interface and actions part
again assuming the reader is known to Visual Studio and Windows Mobile development.

the mobile interface looks like this:

Add the reference to the web service in your .NET project and give it a name. In my case
its Sensorinfo.

E.g adding the web reference it goes like this http://192.168.1.12/somename.php?wsdl

The Mobile code goes like below calling the string value result from web service.
========================================
Download code below for windows mobile
-> mobile.cs C#

Well nothing more to tell and explain at this moment. NuSOAP was handy and simple to use and it took rather less hours to put my web services as compared with other web service framework.

Have Fun Happy Coding !

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: