Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 16, 2012 12:24 PM by DMW
Feb 10, 2012 06:34 AM|LINK
I have a fundamental question on the REST implementation on the client side. Since we don't create proxy for the REST WCF services, how does the client know about the concrete types used in the server?
Example method is
how does the client knows about the Customer Type?. Do we need to explicity include the dll(Which contains the Customer Type definition) for the client side?
Feb 10, 2012 08:54 AM|LINK
REST clients are NOT supposed to know about the concrete types in the server.
After all, the client and the server could be running completely different technologies.
Therefore, you will need to share schema, not class, between the client and the server.
Feb 13, 2012 06:41 AM|LINK
Ok. How does the schema sharing in WCF rest happens? I am just started with the WCF rest - so keen to know about this. If you can share some URL's / samples on this, it will be of great help
Feb 15, 2012 07:24 PM|LINK
Have a look at this link - it is from my blog where I ran into the same thought as you
and part 2
Feb 16, 2012 07:44 AM|LINK
Thanks for your response. Here you have explained about a service created from your end and that is consumed by you only. So you have the library/ the information about types. But my concern is on the services created by someone else where we have no info
about his types.
Feb 16, 2012 12:19 PM|LINK
Let me re-iterate, you're NOT supposed to know about the types.
You really need to try to understand core SOA principles, such as "Share schema, not type" and "Boundaries are explicit".
If you are using a 3rd party, REST-based service, they should publish, either in example form or via a simple schema document, what their operations are and what the expected incoming messages and the possible output message responses are.
You cannot share types.
Feb 16, 2012 12:24 PM|LINK
To help you out, here's a classic example of what a very well-known and respected organisation does for their REST-based API:
No types: just documentation.