web service php - request and response

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

web service php - request and response

Postby miscialo » Thu Jan 14, 2010 12:35 am

hi! i would create a webservice in php and an android client that sends to the server 2 integers. the service generates a random number between them and give the result to the client ...

so i 'm confused between ksoap, rest, xml-rpc, post method...

what is the simple way to do that?? does anybody have any ideas?

help me please...
miscialo
Freshman
Freshman
 
Posts: 8
Joined: Thu Jan 14, 2010 12:26 am

Top

Postby miscialo » Thu Jan 14, 2010 12:49 am

this is an example of webservice...

Code: Select all
<?php
  $soap = new SoapServer(
    'RandomNumberService.wsdl',
    array('uri' => 'http://localhost/')
  );
  $soap->setClass('ServiceClass');
  $soap->handle();
 
  class ServiceClass {
    function randomNumber($lower, $upper) {
      return rand($lower, $upper);
    }
  }
?>


how could create a client for android?
miscialo
Freshman
Freshman
 
Posts: 8
Joined: Thu Jan 14, 2010 12:26 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 2 guests