Basically via VS.NET IDE we reference the WCF service as shown below. doing this way we need to update the service Reference whenever WCF service Operation or Data Contracts changes.
Here is the way we can Invoke WCF service with out Adding a Service Reference.
Thanks
SreenivasaRagavan.
8 comments:
Without adding service reference how can you get the interface IFortune?Can you explain
Hi Savitha,
IFortune is the ServiceContract.
just Add all SeviceContract Interfaces to your Client Project that is all.
Thanks
Ragavan
Hi,
Is there a way we can invoke WCF even without including the Service Contract Interface in our project? This is possible for Web Services using System.Web.Services.ServiceDescription object and System.Web.Services.ServiceDescriptionImporter instances.
I just cant get through to invoke WCF similarly.
Hi Viswanathan,
I think when you use this System.Web.Services.ServiceDescription you are basically creating proxy dynamically and invoking .
yes. But since the architecture of WCF is different from web service, like we need contracts, end points, etc, we cannot use System.Web.Services.Description.ServiceDescription class. This causes exceptions especially when it is wsHTTPBinding. I came across Vipul Modi's blog with source code for a dynamic WCF client - http://blogs.msdn.com/vipulmodi/archive/2006/11/16/dynamic-programming-with-wcf.aspx.
But that is too sophisticated. I am just expecting a small method as a one that can be achieved with ServiceDescription class.
"just Add all SeviceContract Interfaces to your Client Project that is all."
Don't you think if there is any change in ServiceContract Interfaces then we need to our client as well? If yes, so how it is different from adding service reference?
Hi,Planning websites is pretty much like designing stage sets, it must look great, but under the surface it has to work with Web Design Cochin so that the search sites and web surfers can find your website.Thanks....
Post a Comment