I have a service I'm exposing using WCF, running on Mono in a SLES box. I'm using BasicHttpBinding for this. Now, I have a method that simply returns a boolean value, and I want to call this method from the SLES box itself and get the boolean value. I'm trying to use curl for this but so far I have not had any success calling the method.
Let's say my service is called "RemoteService" and the method I want to call is "CheckProcessRunning". Again, CheckProcessRunning simply returns a boolean value, and it returns very fast.
So I have tried:
curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:" -X GET http://localhost:4000/RemoteService/CheckProcessRunning
curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:RemoteService/CheckProcessRunning" http://localhost:4000/RemoteService/CheckProcessRunning
curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:url:CheckProcessRunning" http://localhost:4000/RemoteService
All return something like this:
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:DestinationUnreachable</faultcode><faultstring xml:lang="">The request message has the target 'http://localhost:4000/RemoteService/CheckProcessRunning' with action '' which is not reachable in this service contract</faultstring></s:Fault></s:Body></s:Envelope>
So my question is, how can I do curl requests to a SOAP method in a WCF service? I need to do this using BasicHttpBinding - I've looked into WebHttpBinding, but I found I cannot use it as it breaks other functionality.