Note that there are some explanatory texts on larger screens.

plurals
  1. POerror in calling Web Service
    primarykey
    data
    text
    <p>I am not able to call a<code>web service</code> even after adding <code>kSOAP 2 library jar</code> file. </p> <p>Source code : <br></p> <pre><code> package com.example.web; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.AndroidHttpTransport; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import android.widget.Toast; public class MyWebCall extends Activity { TextView tv; String Name_Space="http://web.exampl.com/"; String Method_Name="add"; String Soap_Action="http://web.exampl.com/add"; String URL="http://MyServerIPaddress:8081/WebService/services/MyWebService?wsdl"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tv=(TextView)findViewById(R.id.txt); SoapObject request=new SoapObject(Name_Space,Method_Name); PropertyInfo pi1=new PropertyInfo(); pi1.setName("op1"); pi1.setValue(6); pi1.setType(int.class); request.addProperty(pi1); PropertyInfo pi2=new PropertyInfo(); pi2.setName("op1"); pi2.setValue(9); pi2.setType(int.class); request.addProperty(pi2); SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); AndroidHttpTransport androidHttpTransport=new AndroidHttpTransport(URL); try{ androidHttpTransport.call(Soap_Action,envelope); SoapObject response=(SoapObject) envelope.getResponse(); int result=Integer.parseInt(response.getProperty(0).toString()); System.out.println("Result ::::::::::::::: "+result); tv.setText(response.getProperty(0).toString()); Toast.makeText(getApplicationContext(), response.getProperty(0).toString(),Toast.LENGTH_SHORT).show(); }catch(Exception e){ e.printStackTrace(); } } } </code></pre> <p>I feel few classes are missing in jar. From where can i dwnld proper jar file? Pls help me. </p> <p>Thanks &amp; Regards,<br> Sneha</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload