Powered by Blogger.

Sunday, March 2, 2014

How the Windows Communication Foundation’s service model works?



we will discuss understanding of how the Windows Communication Foundation’s service model works.The following sequence of events occurs:
Also you can check out:

- Export gridview data to excel sheet in Asp.net

- How to display serial number automatically in GridView in asp.net?

- Show confirmation message in gridview for delete in Asp.net

1. The client operation selector determines to which operation of the service to direct a request, based on which method of the client was invoked.

2. Any parameter inspectors attached to the client runtime components specific to that operation get to see the data that the developer’s code is passing as arguments Extending the Service Model with to the operation, and can modify that data, too. Parameter inspectors might be used to confirm that the values of outbound data items fall within a specific range, and to adjust them if they do not.

3. The client message formatter serializes the data items into XML, and writes the XML
into the body of a Windows Communication Foundation message.

4. The System.ServiceModel.Channels.Message object representing the message is
passed to the client runtime component at the endpoint level.

5. The client message inspector is permitted to examine and optionally modify the
System.ServiceModel.Channels.Message object representing the message.

6. The message is passed to the Windows Communication Foundation’s Channel Layer
for delivery.

7. The message is received by the service and passed from the Channel Layer to the
channel dispatcher, which passes it on to the dispatcher component of the appropriate
endpoint.

8. The instance context provider retrieves any state information.

9. The dispatch operation selector determines to which operation,Based on the addressing of the message.

10. The dispatch message inspector is permitted to examine and optionally modify the
System.ServiceModel.Channels.Message object representing the incoming message.

11. The instance provider creates or retrieves the instance of the service type that will
be passed the data extracted from the message.

12. The message is passed to the dispatcher component for the operation identified by
the dispatch operation selector.

13. The dispatch message formatter for the operation deserializes the body of the
message into an array of data items.

14. Parameter inspectors attached to the dispatcher components for the operation are
permitted to examine and optionally modify the data items.

15. The operation invoker for the operation invokes the method of the service by which
the operation is implemented, passing the data items deserialized from the body of
the message as arguments to the method.

16. If the method returns data, the parameter inspectors attached to the dispatcher
components for the operation are allowed to look at and modify that data.

17. The dispatch message formatter for the operation serializes the data returned by the
method into a System.ServiceModel.Channels.Message object that represents the
response to the message received from the client.

18. That response message is passed to the dispatcher component at the endpoint level.

19. The dispatch message inspector is permitted to examine and modify the response
message.

20. The instance context provider is allowed to persist or discard the state information.

21. The instance provider is given the opportunity to dispose of the instance of the
service type that it created or retrieved to process the message.

22. The response message is passed to the channel dispatcher, which passes it on for
transmission to the uppermost channel in the hierarchy of channels that the Windows Communication Foundation builds in accordance with the binding selected for the endpoint.

23. The response message is received by the client and passed from its Channel Layer to
the client runtime component for the receiving endpoint.

24. The client message inspector of that client runtime component examines and
optionally modifies the response message.

25. The client operation selector identifies the operation to which the response message
pertains based on the addressing of the message.

26. The response message is passed to the client runtime component for that operation.

27. The client message formatter deserializes the body of the response message into an
array of data items.

28. That array of data items is passed to any parameter inspectors attached to the client
runtime component of the operation for examination and optional modification.





0 comments

Post a Comment