Reputation: 83
I'm calling a (php) webservice (from ClearPass ArubaNetworks) in C#.
But I'm getting an Exception complaining about 'Invalid SOAP request: HTTP method 'GET' is not POST'
Has someone an idea what the problem could be?
Thanks!
EDIT (included code)
using (GuestManagerWebServiceClient client = new GuestManagerWebServiceClient())
{
client.ClientCredentials.UserName.UserName = "*********";
client.ClientCredentials.UserName.Password = "*********";
EmptyType pingRequest = new EmptyType();
ResultType pingResponse = client.Ping(pingRequest);
Console.WriteLine("error: {0}, message: {1}", pingResponse.error, pingResponse.message);
Console.ReadLine();
}
Upvotes: 0
Views: 1509
Reputation: 7332
GET and POST are two of the major HTTP methods. GET is generally for requesting data, and only expects a simple URL, perhaps with parameters. While it has come to be used for other things, it was not intended for changing server state.
A POST represents data posted back and normally includes an attachment of data to be sent to the server that the server can act on or store somewhere.
When making an http request - it is generally one of these methods - although there are a couple more that are not used as commonly.
For a (much, much better) explanation than mine - see this - http://www.w3schools.com/TAGS/ref_httpmethods.asp
Upvotes: 0