0

I want to retrieve the response from the web server using an id. I need to send the id along with the namespace,method name, soap action and url, I dont know how to send this id with them using ksoap library. Can anybody help me, what method we need to use for sending an id to request?

Thanks,

Incognito
  • 20,537
  • 15
  • 80
  • 120
Taruni
  • 1,671
  • 4
  • 22
  • 43

3 Answers3

0

check this: See Sharp Gears: Basic KSOAP Android Tutorial and don't forget it is not always true that:

SOAP_ACTION = NAMESPACE + METHOD_NAME;

find SoapAction in WSDL.

hasanghaforian
  • 13,858
  • 11
  • 76
  • 167
0

Here's a shameless plug for another ksoap2-android tutorial.

http://www.shanekirk.com/2011/11/speaking-soap-with-android/

Shane Kirk
  • 301
  • 2
  • 8
0

Well for starters you should have a look at this. I am doing a similar thing. I am sending username and password to my SOAP web service. You can send the "ID" in that way.

Also, note this :

request.addProperty("userid", user_id);

request.addProperty("password",password);

This is used to add a request to your webservice. It should match with the column name of your database for successful results.

If you have any doubts please feel free to ask

Thanks

Community
  • 1
  • 1
Parth Doshi
  • 4,200
  • 15
  • 79
  • 129
  • Hai Parth, I tried the same thing...but getting an exception that "the web server have taken my id as null" see here: http://stackoverflow.com/questions/8222800/how-to-send-id-to-the-webservice-to-retrieve-the-response-in-android – Taruni Nov 24 '11 at 06:35
  • ok do one thing send me your web service code on androidparth@gmail.com..I will run it myself using my code and tell you soon. Is it a .asmx web service? – Parth Doshi Nov 24 '11 at 06:44
  • Hey hi I am sorry but I have never worked using WSDL before. I tried ur code using SOAP web service(.asmx) and it works fine. I created sample database having ID and password and depending upon ID, I retreive password from user – Parth Doshi Nov 25 '11 at 02:42