Webservice php without using soap? [closed]

2

I'm not familiar with Webservice and wanted to know how to make one, without the need to use Soap (to grab data from the bank and consume it in Android Studio).

    
asked by anonymous 21.10.2016 / 11:13

1 answer

0

Use JSON as a return ... Then on Android you get some help with the library and create the objects using Gson

Simple example in php that returns a JSON array:

$result = $this->con->query("SELECT * FROM usuario");

    if ($result->num_rows > 0) {

        while ($obj = mysqli_fetch_object($result)) {
            $lista[] = $obj;                
        }
    }

    return $lista;
    
21.10.2016 / 15:53