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.
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
.