Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve HTTP status 405 "Method Not Allowed" when calling Web Services

I've got a siluation where i need to access a SOAP web service with WSE 2.0 security. I've got all the generated c# proxies (which are derived from Microsoft.Web.Services2.WebServicesClientProtocol), i'm applying the certificate but when i call a method i get an error:

System.Net.WebException : The request failed with HTTP status 405: Method Not Allowed.
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

I've done some googling and it appears that this is a server configuration issue. However this web service is used many clients without any problem (the web service is provided by a Telecom New Zealand, so it's bound to be configured correctly. I believe it's written in Java)

Can anyone shed some light on this issue?

like image 814
Muxa Avatar asked Sep 30 '08 01:09

Muxa


1 Answers

Ok, found what the problem was. I was trying to call a .wsdl url instead of .asmx url. Doh!

like image 136
Muxa Avatar answered Oct 26 '22 12:10

Muxa