Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Please try this this my working code. just do your necessary changes. <strong>And if you are saying it is going direct to catch block, it means it is throwing some exception.</strong> please try to see what is that. <strong>use asynctask for background thread(request response)</strong></p> <pre><code>// put here your url's.. private final String URL = "http://192.192.192.192/DemoService/Demo.asmx"; private final String SOAP_ACTION = "http://tempuri.org/AndroidTestRequest"; private final String METHOD_NAME = "AndroidTestRequest"; SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("User", "abcd@gmail.com"); request.addProperty("Password", "test@123"); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.headerOut = new Element[1]; envelope.headerOut[0] = buildAuthHeader(); envelope.dotNet = true; envelope.setOutputSoapObject(request); // you can add your properties here if you want to. /* * PropertyInfo cityProp = new PropertyInfo(); * * cityProp.setType(String.class); request.addProperty(cityProp); */ Log.e("value of request", request.toString()); Log.e("Value of envolope ", envelope.toString()); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_ACTION, envelope); Log.i("myAppEnvelope", envelope.toString()); SoapObject response = (SoapObject) envelope.getResponse(); SoapObject object = (SoapObject) response.getProperty("value"); } catch (Exception e) { e.printStackTrace(); } </code></pre>
    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.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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