Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid KSoap fault exception passing parameter
    text
    copied!<pre><code>public class Result extends Activity { private final String NAMESPACE = "http://tempuri.org/"; private final String URL = "http://10.101.21.18/MDSService/Service1.svc?wsdl"; private final String SOAP_ACTION = "http://tempuri.org/IService1/GetAssmtDataByLoginIdAndPassword"; private final String METHOD_NAME = "GetAssmtDataByLoginIdAndPassword"; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); SoapObject soapObject=new SoapObject(NAMESPACE, METHOD_NAME); Intent in = getIntent(); soapObject.addProperty("loginName","ginnas"); soapObject.addProperty("password","orcas"); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(soapObject); HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.setXmlVersionTag("&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;"); try { androidHttpTransport.call(SOAP_ACTION, envelope); System.out.println("call success"); SoapObject soapResponse = (SoapObject)envelope.getResponse();//throws the soap fault exception at this line Log.i("myApp", soapResponse.toString()); } catch (org.xmlpull.v1.XmlPullParserException ex2) { System.out.println("EXCEPTION: " + ex2.getMessage()); } catch (SoapFault e) { System.out.println("SOAPFAULT===="); e.printStackTrace(); } catch (IOException e) { System.out.println("IOEXCEPTION===="); e.printStackTrace(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } </code></pre> <p>This code gives me the following exception: </p> <pre><code>SoapFault - faultcode: 'a:InternalServiceFault' faultstring: 'Query error occured : Procedure or function 'GetResidentAssmtDataByUser' expects parameter '@loginName', which was not supplied.' faultactor: 'null' detail: org.kxml2.kdom.Node@4053c030 </code></pre> <p>Login name and password are correct.</p> <p>What I have done so far:<br> Internet permission<br> envelop.dotNet=true/false<br> SoapPrimitive response = (SoapPrimitive)envelope.bodyIn; </p> <p>But this will give the same exception. Please solve my problem.</p>
 

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