index > Connected Services Framework > How to send synchronous message to the service?

How to send synchronous message to the service?


Hi All!

I'm using CSF 3.0 Developer Edition Full.

I've tried to send a synchronous message from one servcie to another through a CSF session, but it hasn't worked. On this forum I read, that CSF doesn't support synchronous exchange between services, but there wasn't explanation why. And in the development guide it is said that synchronous exchange is possible.

Here is my code:

Header header = new Header();
header.Addressing = new Microsoft.ConnectedServices.Sdk.Addressing.AddressingHeaders(MyURI);
header.Addressing.To = SessionUri;
header.CsfProperties.SessionId = SessionId;

header.Addressing.Action = MyAction;

Message request = Message.CreateMessage(header, MyRequestType);

MyResponseType response = sender.SendSync<MyResponseType>(request);

What is wrong?
Does anybody know how to send synchronous message to the service from another service through CSF session? Or is it impossible?

Thank you in advance.
VovaNN

Hi Vova,

Let me share my understanding. When you try to send a syncronous message to another service through CSF session, you typically set a Action, and when CSF session receives your message, it examines the (Soap)Action in the message and routes the message to the sevice for which criteria evaluates to true (the channel used for sending this initial message is kept open as it is a syncronous call).

Now when the second service receives this message, it sends back response to CSF Session, but with its own Action (typically MethodNameResponse). When CSF Session intercepts this response from second service, it will route this message to the participant for which routing critiria evaluates to true. And here the syncronus call you made in begining will never get any response as the response sent by CSF session will be on a different channel.

To make sure that CSF returned a response, you can check the _OutputTrace.webconfig file.

I think synshronous messaging works only when two services interact directly and not through CSF Session.

Thanks,

Ashish Malhotra

AshishMalhotra
Hi Ashish,

Seems your considerations are correct.

I've performed some additional tests. Here are my results:
1. In the session traces all responses are present.
2. Synchronous messages works well, if service interacts directly with another service.

Thank you for explanation.

It's very strange that CSF doesn't support synchronous calls through a session, because sometimes it is very useful.
Does Microsoft have plans to add this functionality in the future releases of the CSF. Does anybody know?

VovaNN

Hello Vova,

The code you have implemented is perfectly fine.

But I want you to go through the following check lists:

  1. Check whether the service returns void or MyResponseType. sender.SendSync works when the function returns some object other than void.
  2. Does the end service use any policies? If yes, then you need to send security tokens to the end service.
  3. Also enable trace in Session service. Modify its web.config file to enable input and output trace. If possible implement traces in the end service as well.

I hope that would help you in tracking the solution to the problem.

Regards,

Vikram

V i k r a m
reply 4

You can use google to search for other answers

 

More Articles

• Security Toekn Configuration in Manifest File
• CSF 3.0 Information about Service Logic and samples?
• OHSBE Installation issue - OHSBE Monitor windows service generate...
• Microsoft Connected Services Framework 3.0 BTS WSE Adapter
• Session error
• HelloWorld sample not working
• Why does "anonymous" address present in response messag...
• CSF for Windows XP
• Installation Issue - CSF 3.0
• OHSBE Installation issue - Mapping Kerberos token to OHSBE servic...
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

• Installation Issue - CSF 3.0
• RDF - Profile Manager
• Impact on performance while using sessio
• Why Service Catalog is absent?
• Move CSF databases to a different SQL Se
• CCF WorkFlow
• OHSBE 3.0 Sample error
• I m getting an error while invoking the
• Permisison Issue - HelloWorld Example wi
• Is CSF Mature? Does it support other ind
• CSF 3.0 installation trouble
• MS Customer Care Framework
• TerminateSessionResponse
• Simulating Exception scenarios for third
• Service Catalog Installation Issue

Hot Articles

• Any way to retrieve original SOAP action?
• HelloWorld sample - Different approach
• CCF Demo Applications
• Profile Manager - User Service Mapping
• CSF 3.0 installation trouble
• Installation Issue - CSF 3.0
• RDF - Profile Manager
• CCF admin console
• CCF WorkFlow
• Microsoft Connected Services Framework 3
• OHSBE Web Service DB Access Exception
• Does blocking of port 9100 makes soap se
• Why does "anonymous" address p
• OHSBE Installation issue - Mapping Kerbe
• Install OHSBE

Recommend Articles

• Security Toekn Configuration in Manifest
• CSF for Windows XP
• Soap faults from Core services
• How to send synchronous message to the s
• Impact on performance while using sessio
• MS Customer Care Framework
• OHSBE Installation Issue
• TerminateSessionResponse
• Custom Agent Desktop?
• Identity Manager - Tools and Utilities
• CSF 3.0 installation trouble
• HelloWorld sample - Different approach
• Profile Update Notification - Profile Ma
• IBM WebSphere MQ Listener Service in C#
• CCF samples