Run Fetch as web service.

Run Fetch as web service.

Old forum URL: forums.lhotka.net/forums/t/144.aspx


Brent posted on Thursday, May 18, 2006

CSLA 2.0

Is there an attribute to tell the data portal to fetch with a web service when all other fetches are local?  We have a Single-Sign-On system and all applications need to authenticate via the web service.  Most everything else will run locally.  At the moment, I'm just hard coding the web service into the fetch but was wondering if a more pure way exists in CSLA 2.0

Thanks,

 

Brent

RockfordLhotka replied on Thursday, May 18, 2006

From what you describe it sounds like you are doing the correct thing.

The data portal allows you to run your business components on an application server - possibly using web services as a transport.

However, what you are describing (I think) is a web service you are calling in order to authenticate the user. That web service would continue to be a web service even if you set up an app server for the data portal right? So it makes no sense to have a remote data portal to call a remote web service (that's two network hops where you needed one).

I view (non-service-oriented) web services as being no different from stored procedures in a database. Rather than using ADO.NET to set up and execute your command you are using a web service proxy, but that's just plumbing. From an archtiectural and design perspective there's no difference between a web service and a stored procedure.

So I suggest that you are dong the right thing - you've put the data access code (the web service call) into your DataPortal_Fetch() method, just like you would have with a stored procedure call. All is good.

Brent replied on Friday, May 19, 2006

Thanks Rocky.  Wiring it into the Identity.GetIdentity Fetch and using our implementation of the CslaCredentials is killing two birds with one stone.  Very smooth!

Brent

Copyright (c) Marimer LLC