How do I use the command line tool curl for call a wcf service / server is alive?. My binding service wshttpBinding. My service host in IIS 7.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on your definition of “server is alive”. If you only want to know whether the service is responding to any requests, you can send a request to the service base address (
curl http://your.host.com/app/service.svc), and you should get the service help page back (just browse to it and you’ll see what you’ll get back).If you want to check whether a certain operation of the service is working, then it will depend on your binding configuration:
If the configuration of your wsHttpBinding doesn’t use message security or reliable session, then you can use something such as Fiddler to capture the request of a “normal” client (such as the WCF Test Client), then use curl to send the same request.
If the binding uses such a feature, then curl isn’t the best way to do it, since there the client needs to send a few requests (handshaking for the security or RM protocols) before the actual request for the operation is sent.