0

The NServiceBus Web service bridge example only demonstrates a Command message scenario. I am interested in a scenario where the web service bridge uses request/reply to do a synchronous response to the client like any other normal web service call. In other words, can I use the web service bridge to create a web service that does the following things

  1. expose a synchronous method e.g. ClassA process(ClassB objectB) via the web service interface
  2. Behind the scenes call various ascynhronous services hosted as NServicebus services.
  3. When I get all my replies back, synchronously respond with a ClassA object to the web service client

Any help is appreciated.

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
MSVictim4_0
  • 11
  • 1
  • 3
  • Why not just use web services? Btw, what will thread 1 be doing, while you are doing 2 and 3? The WS bridge intention is to link geographically isolated sites, not as an interface for exposing synchronous web methods methods. http://nservicebus.com/Gateway.aspx has more details. – stephenl May 27 '11 at 05:34
  • I want to expose a federated search query as a web service. It's backed up by asynchronous components that search and transform the query results from multiple components within a certain time limit. It seems like the perfect scenario to use Enterprise Integration patterns. The WSDL is mandated by the standards I am following and the response has to be synchronous. – MSVictim4_0 Jun 01 '11 at 17:36
  • Update new link to gateway info - http://docs.particular.net/nservicebus/gateway/ – Peter Jan 29 '16 at 05:34

1 Answers1

0

NSB will only allow for the return of an error code(enum) when you expose your endpoint as a web service. This is by design as all communication is meant to be unidirectional to avoid temporal coupling(process A has to wait for process B)

Adam Fyles
  • 6,030
  • 1
  • 23
  • 29
  • Thank you. Although this didn't directly answer my question, I solved it by making the gateway web service subscribe to appropriate responses, thereby making it a synchronous web service. – MSVictim4_0 Jun 01 '11 at 21:57