Question

I am using Ksoap from Android to access a .net web service.

The wsdl is formatted like this

 <filter>
 <DateFrom> Date1 </DateFrom>
 <DateTo>   Date2 </DateTo>
 </filter>

I use addProperty("DateFrom", date1) same for DateTo. How do I tell ksoap about filter.

The service has a helloword that I can access correctly. When I try the dateservice, ksoap replies with an error: "Object reference not set to an instance of an object"

Was it helpful?

Solution

You need to create soap object and inside the soap object you can create/add the property.

SoapObject filtertSoapObject = new SoapObject(Util.NAMESPACE, "Filter"); filtertSoapObject.addProperty("DateForm", date1); request.addProperty("Filter", filterSoapObject);

It should work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top