Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>to get object from soap webservice:</p> <pre><code> SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope. dotNet= true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_VERATENDIMENTO, envelope); SoapObject result = (SoapObject) envelope.getResponse(); YourClass yourClass = new YourClass(); if (result == null){ return null; } else { yourClass.setName(result.getProperty("name").toString()); yourClass.setEmail(result.getProperty("email").toString()); return yourClass; } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (XmlPullParserException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; </code></pre> <p>to return arraylist do:</p> <pre><code> SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope. dotNet= true; envelope.setOutputSoapObject(request); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); try { androidHttpTransport.call(SOAP_VERMENSAGENS, envelope); SoapObject result = (SoapObject) envelope.getResponse(); List&lt;YourClassObject&gt; yourList = new ArrayList&lt;YourClassObject&gt;(); if (result == null){ return null; } else { for(int i =0; i &lt; result.getPropertyCount(); i++){ SoapObject soap = (SoapObject) result.getProperty(i); YourClassObject yourClass = new YourClassObject(); yourClass.setName(soap.getProperty("name").toString())); yourClass.setEmail(soap.getProperty("email").toString())); yourList.add(yourClass); } return yourList; } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (XmlPullParserException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; </code></pre>
 

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