My Web service code ::
publicstatic DataSet CheckDistanceDB(string _Lat1, string _Long1)
{
return DatabaseAction.F_GENERIC_GET("SELECT Top(1) LT.Name as Name, L.LocationID as LocationID", "Location as L Inner Join LocationType as LT on L.LocationTypeID=LT.LocationTypeID", "WHERE (((cast(L.Latitude as decimal) - " + _Lat1 + ")*(cast(L.Latitude as decimal)- " + _Lat1 + ")) + ((cast(L.Longitude as decimal) - " + _Long1 + ")*(cast(L.Longitude as decimal) - " + _Long1 + ")))<=2500", "");
}
----------------------------------------------------------------
My Android Code ,,this code is working..:
public class main extends Activity {
String SOAP_ACTION =http://tempuri.org/CheckDistance;
String METHOD_NAME =CheckDistance;
String NAMESPACE =http://tempuri.org/;
String URL =http://webservice.navking.com/Service.asmx;
TextView tv;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tv=(TextView)findViewById(R.id.text1);
try{
SoapObject request = new SoapObjec(NAMESPACE,METHOD_NAME);
request.addProperty(Lat1,41.06194785);
request.addProperty(Long1,28.97475539);
SoapSerializationEnvelope envelope =
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet =true;
AndroidHttpTransport httpTransport = new AndroidHttpTranspo(URL);
envelope.setOutputSoapObject(request);
httpTransport.debug=true;
httpTransport.call(SOAP_ACTION, envelope);
httpTransport.setXmlVersionTag("");
SoapObject result=(SoapObject)envelope.getResponse();
String Text = result.getProperty(1).toString();
tv.setText(Text);
} catch (Exception e) {
tv.setText(e.getMessage());
}
}
}
Get data web services..Information from Web services.
output:: anyType{NewDataSet=anyType{Table=anyType{Name=EDS; };Table=anyType{Name=EDS;};
Table=anyType{Name=Radar;};
Table=anyType{Name=Radar;};
Table=anyType{Name=Radar;};
Table=anyType{Name=Radar;};};}
I want to help me!!Soab object get data xml parsin !!!
How do i clear the xml tag here ?????
publicstatic DataSet CheckDistanceDB(string _Lat1, string _Long1)
{
return DatabaseAction.F_GENERIC_GET("SELECT Top(1) LT.Name as Name, L.LocationID as LocationID", "Location as L Inner Join LocationType as LT on L.LocationTypeID=LT.LocationTypeID", "WHERE (((cast(L.Latitude as decimal) - " + _Lat1 + ")*(cast(L.Latitude as decimal)- " + _Lat1 + ")) + ((cast(L.Longitude as decimal) - " + _Long1 + ")*(cast(L.Longitude as decimal) - " + _Long1 + ")))<=2500", "");
}
----------------------------------------------------------------
My Android Code ,,this code is working..:
public class main extends Activity {
String SOAP_ACTION =http://tempuri.org/CheckDistance;
String METHOD_NAME =CheckDistance;
String NAMESPACE =http://tempuri.org/;
String URL =http://webservice.navking.com/Service.asmx;
TextView tv;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tv=(TextView)findViewById(R.id.text1);
try{
SoapObject request = new SoapObjec(NAMESPACE,METHOD_NAME);
request.addProperty(Lat1,41.06194785);
request.addProperty(Long1,28.97475539);
SoapSerializationEnvelope envelope =
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet =true;
AndroidHttpTransport httpTransport = new AndroidHttpTranspo(URL);
envelope.setOutputSoapObject(request);
httpTransport.debug=true;
httpTransport.call(SOAP_ACTION, envelope);
httpTransport.setXmlVersionTag("");
SoapObject result=(SoapObject)envelope.getResponse();
String Text = result.getProperty(1).toString();
tv.setText(Text);
} catch (Exception e) {
tv.setText(e.getMessage());
}
}
}
Get data web services..Information from Web services.
output:: anyType{NewDataSet=anyType{Table=anyType{Name=EDS; };Table=anyType{Name=EDS;};
Table=anyType{Name=Radar;};
Table=anyType{Name=Radar;};
Table=anyType{Name=Radar;};
Table=anyType{Name=Radar;};};}
I want to help me!!Soab object get data xml parsin !!!
How do i clear the xml tag here ?????