There was no endpoint listening at http://localhost:[number]/XXXXX.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
Initially i thought that some configuration went wrong .After investigation i found that we need to disable the default proxy.I have added below config settings in the Web.config of service host project. After that everything worked perfectly !!!
<system.net> <defaultproxy enabled="false"> </defaultproxy> </system.net>