[OperationContract] List<LocationData> GetAllLocations(); RegisterLocation.svc public List<LocationData> GetAllLocations() { return list_location_data; }
public class LocationData { public String lg { set; get; } public String lat { set; get; } public String userid { set; get; } public DateTime datetime { set; get; } }
try { SoapObject request = new SoapObject(NAMESPACE, "GetAllLocations"); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); //URL = http://MyIPAddress/fnf/RegisterLocation.svc HttpTransportSE ht = new HttpTransportSE(URL); //LOAD_ACTION = "http://tempuri.org/IRegisterLocation/LoadAllLocations" ht.call(LOAD_ACTION, envelope); final SoapPrimitive response = (SoapPrimitive)envelope.getResponse(); final String str = response.toString(); } catch (Exception e) { sb.append("Error:\n" + e.getMessage() + "\n"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)