Home Android KSOAP2 error to get value
Reply: 0

Android KSOAP2 error to get value

user1896 Published in June 20, 2018, 10:58 pm

I have error to get value from web service. I try alltime but not success. I did webservice using with WCF, Entity framework. this server Works good. But I want to connect and get value from Android phone.

My Android code :

private final String NAMESPACE="http://tempuri.org/";
private final String SOAPACTION="http://tempuri.org/IService/GetValues";
private final String METHODNAME="GetTreatmentValues";

private final String URL="http://localhost:49674/Service.svc";

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.layout.menu); button1.setOnClickListener(new View.OnClickListener() {

public void onClick(View v) {

          SoapObject request = new SoapObject(NAMESPACE,METHODNAME);

          SoapSerializationEnvelope sp = new SoapSerializationEnvelope(SoapEnvelope.VER11);

          HttpTransportSE aht = new HttpTransportSE(URL);
          aht.debug = true;
          //AndroidHttpTransport aht = new AndroidHttpTransport(URL);
          try {
              aht.call(SOAPACTION,sp);  //I have ERROR! no work.
              //SoapPrimitive resultstring = (SoapPrimitive)sp.getResponse();
          } catch (Exception e) {
              // TODO: handle exception

I get error aht.call(SOAPACTION,sp); text1 never sets "test" What should I do. I don't know what I miss. thanks. (using Ksoap2.4)

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.307937 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO