InChannelResponse parameter and Session interaction with CSF SDK based services
When you define a CSF session, InChannelResponse partecipant's parameter allows to define how CSF session server communicate with the selected endpoint. In particular it allows to specify whether it should hold open the channel that the session server uses to communicate with the service when it routes a message, or whether it should close the channel. In the following example, CSF can recognize successfully the "OneWayFalseMethod" response only if the partecipant have InChannelResponse=true
public class GenericSoapService : SoapService
{
public GenericSoapService()
{
}
[SoapMethod(ServiceActions.OneWayFalseMethodRequest, ResponseAction = ServiceActions.OneWayFalseMethodResponse)]
public String OneWayFalseMethod()
{
return "GenericSoapService OneWayFalseMethodResponse: OK";
}
}
If you use CsfService instead of SoapService to derive your service class, It have enough logic inside to undestand how CSF is calling him and decide how to deliver the answer in the correct way.
Infact the following example works with both InChannelResponse=true and InChannelResponse=false
[CsfService(Name = "TestCSFService", Namespace = "https://TestCSFService")]
public class Service : CsfService
{
[Operation(Name = "OneWayFalseMethod",
Action = ServiceActions.OneWayFalseMethodRequest,
ResponseAction = ServiceActions.OneWayFalseMethodResponse,
Oneway = false)]
public String OneWayFalseMethod(String OneWayFalseMethodRequest)
{
return "OneWayFalseMethodResponse: OK";
}
}
More information:
- How the InChannelResponse Property Affects Messaging
- Download Microsoft Connected Services Framework 3.0 Developer Lite Edition, Microsoft.ConnectedServices.Sdk.* libraries included