1

I've made an Android client for a WCF SOAP web service. The web service is hosted on an IIS server. I can make calls using ksoap2-android over HTTP without problems, but when I tried to perform the calls in a more secure fashion using HTTPS, it doesn't work. The response I get from the server is HTTP/1.1 405 Method Not Allowed. One of the header properties is allow=[GET, HEAD, OPTIONS, TRACE], so I guess the problem is that POST isn't allowed for some reason.

I've tried to perform the call using GET instead, but that doesn't seem to work either. This is really weird, but when I look at the connection it says that the method is GET, but when I look at the error stream of the connection, it says that the method is POST.

Note that I can connect to the web service in the browser without problems and that the services certificate is a proper trusted one. I haven't been able to test the service in WCF Test Client, so I'm not sure if the problem is in my client or the server or service.

I'm not really sure where to go from here. I'm not really sure that POST not being allowed is the real problem here. It seems to me that there's something else that's wrong, but I have no idea what that would be.

Shathur
  • 1,425
  • 1
  • 15
  • 19
  • Partially agreed with your answer, the request URL is not complete, some additional information is expected (addressing particular web-method?), dependant on web-service server implementation – tomasb Aug 06 '12 at 14:06

2 Answers2

0

I believe your problem is in version of ksoap2 androd library

Related SO questions

So your problem can be one of these:

  • Old ksoap2 library (older than 2.5.2)
  • Untrusted SSL certifikate on server (answer how to fix it is here: KSOAP 2 Android with HTTPS)
Community
  • 1
  • 1
Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
  • Thanks, but that's not the problem. I'm using a trusted certificate and the client does not complain about that. Also, I'm currently using the latest version of ksoap2-android, so that shouldn't be the problem either, however I'm open for the possibility that there's a problem in ksoap2-android itself. – Shathur Oct 05 '11 at 11:26
0

I found out that the problem is that I made the call to the directory (default document?) and not the .svc file. When I completed the address with the path to the .svc file I managed to resolve this issue. Now I get 404 Not Found instead, but that's another question.

Basically, I called http://mydomain.com/service/ when I really should have called http://mydomain.com/service/service.svc.

Shathur
  • 1,425
  • 1
  • 15
  • 19