MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

Calling External CSLA Service from CSLA application server #327

Open ashishaon opened 7 years ago

ashishaon commented 7 years ago

We have a requirement where we need to hop to another CSLA service to get Data. Ultimately we have to call External CSLA Service from within business objects running on CSLA application server. See image:

service hop

Can you please suggest the configuration changes required on both (CSLA application server & External CSLA service) end?

jonnybee commented 7 years ago

You need to create a service facade on the external CSLA Service and call it f.ex as a REST service. from the CSLA application server.

ashishaon commented 7 years ago

Is it possible in CSLA to make same CSLA application server to work both as a a service (DataPortal Server) and as well as Client(DataPortal Client) to another service.

jonnybee commented 7 years ago

That depends though on what it is you want to achive,

Do you want to have:

  1. server to act as a "proxy only" to forward all calls for some types to another server.
  2. and process calls for certain other types.

or

  1. server to process calls for all types and be able to make DataPortal calls to another server.
ashishaon commented 7 years ago
  1. server to act as a "proxy only" to forward all calls for some types to another server.
  2. and process calls for certain other types.

This is exactly I want. Please suggest changes I should make.

jonnybee commented 7 years ago

See: http://forums.lhotka.net/forums/p/7753/37003.aspx

It is not a matter of simple configuration provided out of the box in CSLA.NET. You need to create your own Host and a way of determining which route to take for a given object.

ashishaon commented 7 years ago

Hi Jonny,

Thanks for reply.

You need to create your own Host and a way of determining which route to take for a given object.

I'm bit confused about customizing host. Is there some sample to do the same or reference in CSLA books?