DBServer6668 / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

Null parameters receiving at server #168

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add parameter by creating PropertyInfo object
2. After invoking of call method check requestDump like 
androidHttpTransport.requestDump
3. copy the dump and paste into SoapUI
4. Null parameters are receiving by server

Request Dump as following:
<v:Envelope 
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:d="http://www.w3.org/2001/XMLSchema" 
    xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
    xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
<v:Header />
<v:Body>
<n0:agentLoginRequest id="o0" c:root="1" 
xmlns:n0="http://www.abc.net/webservices/agentServices">
    <servername i:type="d:string">test.com</servername>
    <password i:type="d:string">test</password>
    <userId i:type="d:string">test</userId>
</n0:agentLoginRequest>
</v:Body>
</v:Envelope>

and When i changed paramters xml as then it successfully run at server with 
property parameters values

<n0:servername i:type="d:string">test.com</n0:servername>
<n0:password i:type="d:string">test</n0:password>
<n0:userId i:type="d:string">test</n0:userId>

KSOAP2 v 3.0.0

Please provide any additional information below.

Original issue reported on code.google.com by shoaibas...@yahoo.com on 8 Jul 2013 at 11:39

GoogleCodeExporter commented 8 years ago
SoapObject soapObject = new SoapObject(getNamespace(), getMethodName());

if(params != null && !params.isEmpty()){
   for(Map.Entry<String, String> e : params.entrySet()){
   PropertyInfo info = new PropertyInfo();
   info.setName(e.getKey());
   info.setValue(e.getValue());
   info.setType(String.class);              
   soapObject.addProperty(info);
}

SoapSerializationEnvelope envelope = new 
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(soapObject);

HttpTransportSE androidHttpTransport = new HttpTransportSE(getUrl());
androidHttpTransport.debug = true;
try {

androidHttpTransport.call(getSoapAction(), envelope);
Log.e("Soap error, request ",androidHttpTransport.requestDump);
Log.e("Soap error, response ",androidHttpTransport.responseDump);
response = (SoapObject)envelope.getResponse();
Log.e("Object response", response.toString());

} catch (Exception e) {
Log.e(e.getMessage(), e.toString());
e.printStackTrace();
}

Original comment by shoaibas...@yahoo.com on 8 Jul 2013 at 11:43

GoogleCodeExporter commented 8 years ago
Duplicate of http://code.google.com/p/ksoap2-android/issues/detail?id=158

Original comment by shoaibas...@yahoo.com on 8 Jul 2013 at 12:05

GoogleCodeExporter commented 8 years ago

Original comment by mosa...@gmail.com on 8 Jul 2013 at 6:07