4. Streaming
âą When to use:
â Data is too big and the transfer needs to be buffered
â Data should be processed by chunks
âą Limitations:
â Supported not in all bindings
â Streaming methods can have only one parameter
â Session is not supported when streaming data
Streaming alternatives?
DIY! (do it yourself)
You can create several methods that will return data in chunks.
5. Message Contracts
âą When to use:
â You need full control of SOAP messages
â You want to pass additional information with
response (like security, etc.)
â You want to add additional information with
request, but donât want to mess the interface for
compatibility purposes
â Useful together with streaming option
6. Duplex Contracts
sd Use Case Model
WCF Client WCF Service
GetData()
getcallbackchannel()
CallDuplexMethod()
7. âą When to use:
â You need to define two-way communication
between client and server
â You need to notify client about some event
âą Limitations:
â Duplex behavior is working only within a client
session
8. Create WCF client in code.
âą Why?
â More control over client proxy
â Want to track changes to the WCF client
implementation
âą How?
â Use of ClientBase
â ChannelFactory
9. Service Discovery
âą Announcement endpoints
â Useful to notify other clients
about service start/stop
âą Metadata exchange (mex)
â Defines endpoint which provides
information about service
interface
âą WS-Discovery
â Enables service discovery on the
network