[android-developers] plz help me this code not work.....
package com.com; import java.io.IOException; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import org.xmlpull.v1.XmlPullParserException; import android.util.Log; public class WebServicesDemo extends Thread{ private static final String SOAP_ACTION = http://quiver.in/mis/ WriteAndroideData; public static final String NAME_SPACE = http://quiver.in/mis/;; public static final String URL = http://quiver.in/mis/ GPSManager.asmx; public static final String METHOD = WriteAndroideData; public void run(){ SoapObject request = new SoapObject(NAME_SPACE, METHOD); request.addProperty(device_id, 13 ); request.addProperty(id, 1 ); request.addProperty(lat, 100); request.addProperty(lon, 200 ); request.addProperty(name, gajendra ); request.addProperty(village, gwalior); request.addProperty(mobile_no, 8982820806 ); request.addProperty(district, abc ); request.addProperty(gram_name, msc); request.addProperty(block, c ); request.addProperty(date, 21 ); request.addProperty(time, 3); request.addProperty(product, m); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE transport = new HttpTransportSE(URL); try { String TAG = null ; Log.i(TAG , ..Send Data ); transport.call(SOAP_ACTION, envelope); } catch (IOException e) { e.printStackTrace(); } catch (XmlPullParserException e) { e.printStackTrace(); } SoapObject response = (SoapObject)envelope.bodyIn; } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to check flag value in web server data is send or not?
package com; import java.util.ArrayList; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class activity extends Activity { /** Called when the activity is first created. */ private static final String SOAP_ACTION = http://quiver.in/mis/ WriteAndroideData; private static final String OPERATION_NAME = WriteAndroideData; private static final String WSDL_TARGET_NAMESPACE = http://quiver.in/ mis/; private static final String URL = http://quiver.in/mis/ GPSManager.asmx; public void GetAdd() { SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, OPERATION_NAME); PropertyInfo pi = new PropertyInfo(); pi.setName(device_id); pi.setValue(1); pi.setType(String.class); request.addProperty(pi); PropertyInfo pi0 = new PropertyInfo(); pi0.setName(id); pi0.setValue(101); pi0.setType(long.class); request.addProperty(pi0); PropertyInfo pi1 = new PropertyInfo(); pi1.setName(lat); pi1.setValue(2); pi1.setType(long.class); request.addProperty(pi1); PropertyInfo pi2=new PropertyInfo(); pi2.setName(lon); pi2.setValue(3); pi2.setType(double.class); request.addProperty(pi2); PropertyInfo pi3=new PropertyInfo(); pi3.setName(name); pi3.setValue(gajedra); pi3.setType(String.class); request.addProperty(pi3); PropertyInfo pi4=new PropertyInfo(); pi4.setName(village); pi4.setValue(village); pi4.setType(String.class); request.addProperty(pi4); PropertyInfo pi5=new PropertyInfo(); pi5.setName(mobile_no); pi5.setValue(8982820806); pi5.setType(String.class); request.addProperty(pi5); PropertyInfo pi6=new PropertyInfo(); pi6.setName(district); pi6.setValue(Nodia); pi6.setType(String.class); request.addProperty(pi6); PropertyInfo pi7=new PropertyInfo(); pi7.setName(gram_name); pi7.setValue(gram); pi7.setType(String.class); request.addProperty(pi7); PropertyInfo pi8=new PropertyInfo(); pi8.setName(block); pi8.setValue(D); pi8.setType(String.class); request.addProperty(pi8); PropertyInfo pi9=new PropertyInfo(); pi9.setName(date); pi9.setValue(21); pi9.setType(String.class); request.addProperty(pi9); PropertyInfo pi10=new PropertyInfo(); pi10.setName(time); pi10.setValue(21); pi10.setType(String.class); request.addProperty(pi10); PropertyInfo pi11=new PropertyInfo(); pi11.setName(product); pi11.setValue(tot); pi11.setType(String.class); request.addProperty(pi11); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.lang.Integer receivedInt = (Integer)envelope.getResponse(); } catch(Exception e) { } ArrayListString device_id = new ArrayListString(); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.util.VectorObject receivedStrings = (java.util.VectorObject)envelope.getResponse(); if(receivedStrings != null) { for(Object curStrings : receivedStrings) { device_id.add(curStrings.toString()); } } } catch(Exception e) { } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To
[android-developers] how to send data in web service.?
package com; import java.util.ArrayList; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class activity extends Activity { /** Called when the activity is first created. */ private static final String SOAP_ACTION = http://quiver.in/mis/ WriteAndroideData; private static final String OPERATION_NAME = WriteAndroideData; private static final String WSDL_TARGET_NAMESPACE = http://quiver.in/ mis/; private static final String URL = http://quiver.in/mis/ GPSManager.asmx; public void GetAdd() { SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, OPERATION_NAME); PropertyInfo pi = new PropertyInfo(); pi.setName(device_id); pi.setValue(1); pi.setType(String.class); request.addProperty(pi); PropertyInfo pi0 = new PropertyInfo(); pi0.setName(id); pi0.setValue(101); pi0.setType(long.class); request.addProperty(pi0); PropertyInfo pi1 = new PropertyInfo(); pi1.setName(lat); pi1.setValue(2); pi1.setType(long.class); request.addProperty(pi1); PropertyInfo pi2=new PropertyInfo(); pi2.setName(lon); pi2.setValue(3); pi2.setType(double.class); request.addProperty(pi2); PropertyInfo pi3=new PropertyInfo(); pi3.setName(name); pi3.setValue(gajedra); pi3.setType(String.class); request.addProperty(pi3); PropertyInfo pi4=new PropertyInfo(); pi4.setName(village); pi4.setValue(village); pi4.setType(String.class); request.addProperty(pi4); PropertyInfo pi5=new PropertyInfo(); pi5.setName(mobile_no); pi5.setValue(8982820806); pi5.setType(String.class); request.addProperty(pi5); PropertyInfo pi6=new PropertyInfo(); pi6.setName(district); pi6.setValue(Nodia); pi6.setType(String.class); request.addProperty(pi6); PropertyInfo pi7=new PropertyInfo(); pi7.setName(gram_name); pi7.setValue(gram); pi7.setType(String.class); request.addProperty(pi7); PropertyInfo pi8=new PropertyInfo(); pi8.setName(block); pi8.setValue(D); pi8.setType(String.class); request.addProperty(pi8); PropertyInfo pi9=new PropertyInfo(); pi9.setName(date); pi9.setValue(21); pi9.setType(String.class); request.addProperty(pi9); PropertyInfo pi10=new PropertyInfo(); pi10.setName(time); pi10.setValue(21); pi10.setType(String.class); request.addProperty(pi10); PropertyInfo pi11=new PropertyInfo(); pi11.setName(product); pi11.setValue(tot); pi11.setType(String.class); request.addProperty(pi11); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.lang.Integer receivedInt = (Integer)envelope.getResponse(); } catch(Exception e) { } ArrayListString device_id = new ArrayListString(); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.util.VectorObject receivedStrings = (java.util.VectorObject)envelope.getResponse(); if(receivedStrings != null) { for(Object curStrings : receivedStrings) { device_id.add(curStrings.toString()); } } } catch(Exception e) { } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To
[android-developers] how to send data in web service.?
package com.com; import java.io.IOException; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import org.xmlpull.v1.XmlPullParserException; import android.util.Log; public class WebServicesDemo extends Thread{ private static final String SOAP_ACTION = http://quiver.in/mis/ WriteAndroideData; public static final String NAME_SPACE = http://quiver.in/mis/;; public static final String URL = http://quiver.in/mis/ GPSManager.asmx; public static final String METHOD = WriteAndroideData; public void run(){ SoapObject request = new SoapObject(NAME_SPACE, METHOD); request.addProperty(device_id, 13 ); request.addProperty(id, 1 ); request.addProperty(lat, 100); request.addProperty(lon, 200 ); request.addProperty(name, gajendra ); request.addProperty(village, gwalior); request.addProperty(mobile_no, 8982820806 ); request.addProperty(district, abc ); request.addProperty(gram_name, msc); request.addProperty(block, c ); request.addProperty(date, 21 ); request.addProperty(time, 3); request.addProperty(product, m); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE transport = new HttpTransportSE(URL); try { String TAG = null ; Log.i(TAG , ..Send Data ); transport.call(SOAP_ACTION, envelope); } catch (IOException e) { e.printStackTrace(); } catch (XmlPullParserException e) { e.printStackTrace(); } SoapObject response = (SoapObject)envelope.bodyIn; } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to send data in web service.?
package com; import java.util.ArrayList; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class activity extends Activity { /** Called when the activity is first created. */ private static final String SOAP_ACTION = http://quiver.in/mis/ WriteAndroideData; private static final String OPERATION_NAME = WriteAndroideData; private static final String WSDL_TARGET_NAMESPACE = http://quiver.in/ mis/; private static final String URL = http://quiver.in/mis/ GPSManager.asmx; public void GetAdd() { SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, OPERATION_NAME); PropertyInfo pi = new PropertyInfo(); pi.setName(device_id); pi.setValue(1); pi.setType(String.class); request.addProperty(pi); PropertyInfo pi0 = new PropertyInfo(); pi0.setName(id); pi0.setValue(101); pi0.setType(long.class); request.addProperty(pi0); PropertyInfo pi1 = new PropertyInfo(); pi1.setName(lat); pi1.setValue(2); pi1.setType(long.class); request.addProperty(pi1); PropertyInfo pi2=new PropertyInfo(); pi2.setName(lon); pi2.setValue(3); pi2.setType(double.class); request.addProperty(pi2); PropertyInfo pi3=new PropertyInfo(); pi3.setName(name); pi3.setValue(gajedra); pi3.setType(String.class); request.addProperty(pi3); PropertyInfo pi4=new PropertyInfo(); pi4.setName(village); pi4.setValue(village); pi4.setType(String.class); request.addProperty(pi4); PropertyInfo pi5=new PropertyInfo(); pi5.setName(mobile_no); pi5.setValue(8982820806); pi5.setType(String.class); request.addProperty(pi5); PropertyInfo pi6=new PropertyInfo(); pi6.setName(district); pi6.setValue(Nodia); pi6.setType(String.class); request.addProperty(pi6); PropertyInfo pi7=new PropertyInfo(); pi7.setName(gram_name); pi7.setValue(gram); pi7.setType(String.class); request.addProperty(pi7); PropertyInfo pi8=new PropertyInfo(); pi8.setName(block); pi8.setValue(D); pi8.setType(String.class); request.addProperty(pi8); PropertyInfo pi9=new PropertyInfo(); pi9.setName(date); pi9.setValue(21); pi9.setType(String.class); request.addProperty(pi9); PropertyInfo pi10=new PropertyInfo(); pi10.setName(time); pi10.setValue(21); pi10.setType(String.class); request.addProperty(pi10); PropertyInfo pi11=new PropertyInfo(); pi11.setName(product); pi11.setValue(tot); pi11.setType(String.class); request.addProperty(pi11); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.lang.Integer receivedInt = (Integer)envelope.getResponse(); } catch(Exception e) { } ArrayListString device_id = new ArrayListString(); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.util.VectorObject receivedStrings = (java.util.VectorObject)envelope.getResponse(); if(receivedStrings != null) { for(Object curStrings : receivedStrings) { device_id.add(curStrings.toString()); } } } catch(Exception e) { } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To
[android-developers] sir plz check my code why do not send data to web service(.net)
package com; import java.util.ArrayList; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class activity extends Activity { /** Called when the activity is first created. */ private static final String SOAP_ACTION = http://quiver.in/mis/WriteAndroideData;; private static final String OPERATION_NAME = WriteAndroideData; private static final String WSDL_TARGET_NAMESPACE = http://quiver.in/mis/;; private static final String URL = http://quiver.in/mis/GPSManager.asmx ; public void GetAdd() { SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE, OPERATION_NAME); PropertyInfo pi = new PropertyInfo(); pi.setName(device_id); pi.setValue(1); pi.setType(String.class); request.addProperty(pi); PropertyInfo pi0 = new PropertyInfo(); pi0.setName(id); pi0.setValue(101); pi0.setType(long.class); request.addProperty(pi0); PropertyInfo pi1 = new PropertyInfo(); pi1.setName(lat); pi1.setValue(2); pi1.setType(long.class); request.addProperty(pi1); PropertyInfo pi2=new PropertyInfo(); pi2.setName(lon); pi2.setValue(3); pi2.setType(double.class); request.addProperty(pi2); PropertyInfo pi3=new PropertyInfo(); pi3.setName(name); pi3.setValue(gajedra); pi3.setType(String.class); request.addProperty(pi3); PropertyInfo pi4=new PropertyInfo(); pi4.setName(village); pi4.setValue(village); pi4.setType(String.class); request.addProperty(pi4); PropertyInfo pi5=new PropertyInfo(); pi5.setName(mobile_no); pi5.setValue(8982820806); pi5.setType(String.class); request.addProperty(pi5); PropertyInfo pi6=new PropertyInfo(); pi6.setName(district); pi6.setValue(Nodia); pi6.setType(String.class); request.addProperty(pi6); PropertyInfo pi7=new PropertyInfo(); pi7.setName(gram_name); pi7.setValue(gram); pi7.setType(String.class); request.addProperty(pi7); PropertyInfo pi8=new PropertyInfo(); pi8.setName(block); pi8.setValue(D); pi8.setType(String.class); request.addProperty(pi8); PropertyInfo pi9=new PropertyInfo(); pi9.setName(date); pi9.setValue(21); pi9.setType(String.class); request.addProperty(pi9); PropertyInfo pi10=new PropertyInfo(); pi10.setName(time); pi10.setValue(21); pi10.setType(String.class); request.addProperty(pi10); PropertyInfo pi11=new PropertyInfo(); pi11.setName(product); pi11.setValue(tot); pi11.setType(String.class); request.addProperty(pi11); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.lang.Integer receivedInt = (Integer)envelope.getResponse(); } catch(Exception e) { } ArrayListString device_id = new ArrayListString(); try { androidHttpTransport.call(SOAP_ACTION, envelope); java.util.VectorObject receivedStrings = (java.util.VectorObject)envelope.getResponse(); if(receivedStrings != null) { for(Object curStrings : receivedStrings) { device_id.add(curStrings.toString()); } } } catch(Exception e) { } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en