Click here to Skip to main content
13,048,846 members (68,238 online)
Rate this:
Please Sign up or sign in to vote.
See more:
hi frens

I am new to the restful webservice ..... the doubt i ve is :

How can client know the datacontract which is used in restful web service ( for example if we are using the 3rd party web service created by others .... ???

thanks in advance
Posted 2-May-13 4:24am
In brief, the client project should have the Data Contract or Service Contract declarations. Basically, you can have the shared assembly referenced by both client and server parts and than deploy both parts...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If the Service has HttpGet enabled and it is has a Meta Data behavior you can use the ServiceModel Metadata Utility Tool (Svcutil.exe)to create a client proxy.[^]

This is the "How to" step for WCF in creating a client that does so. If the 2 constraints mentioned are not possible then you will need a reference library that exposes the interface contract.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 2 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100