I am newbie with web services. I am trying to create a WCF Restful web service . I have implemented a simple service that accepts parameter name and when the client requests the service it prints hello with name.
I have created a web client and added the reference of the web service to the client. As per my research, as soon as I add the service reference it should update client's web.config according to the service's web config which is not happening. The issue is that .config file is not being created with end points after adding the service reference and even after running svcutil.exe..Either way its not generating the required .config file..
Relevant code:
[ServiceContract]
public interface IRestFulTest
{
[OperationContract]
[WebInvoke(Method= "GET",ResponseFormat=WebMessageFormat.Xml, UriTemplate="xml/{Name}")]
String sayhello(String name);
}
service web.config
<system.serviceModel>
<services>
<service name="ServiceDemo.RestFulTest">
<endpoint behaviorConfiguration="WebBehavior" binding="webHttpBinding"
bindingConfiguration="" contract="ServiceDemo.IRestFulTest" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="WebBehavior">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
what probably could be wrong? Any ideas or suggestions would be really appreciated.