I want to invoke a SOAP webservice with Android using KSOAP2. I managed to get the example in one of the tutorials working, but when trying to make it work on my own webservice, LogCat states "Connection refused". Currently the host address of the webservice is "http://localhost:9001/". I can access it with SoapUI, but not via my Android App.
I can post the code if necessary, but what is the most likely reason for the error message?
And while I'm here: Is there a way to see what the message KSOAP is sending actually looks like? HttpTransport.requestDump seems only to be working if a connection could be established, which in my case couldn't.
I confirm that the address of your machine, as seen from the emulator, is 10.0.2.2
. More info here: Emulator Networking.
About HttpTransportSE.requestDump
: as you say, that will be filled only if there's actual communication (and if you set the HttpTransportSE.debug
flag to true
). If there's no communication, you have other problems than the content of it!