How to use WSSF as webservice product and a direct DB product

Topics: General Discussion Forum, July and December Releases Forum, Service Factory Modeling Edition Forum
Oct 10, 2007 at 1:57 PM
G'day,

I am new to the WSSF and have bene playing around with it for a few weeks now and I am very pleased with the way in which it works for a web service - that part of my product so far is completely satisfied.

My issue is that I am trying to reuse the same factory calls for a webservice or non-webservice product by creating something that will have the option of either using the webservice or hit the Business Logic directly. When the web service uses the Business Logic it all works fine yet a direct connection obviously doesn't as it does not have reference to the websites 'web.config' file. After stepping through the code the Respority code "this.db = DatabaseFactory.CreateDatabase(databaseName);' throws the error "The requested database dbName is not defined in configuration.".

Do you know how I can get the above line of code to work? Sorry if this is totally confusing. I'm trying to explain something I'm still learning .
Cheers,
Brendan
Oct 11, 2007 at 1:19 AM


I am trying to reuse the same factory calls for a webservice or non-webservice product


Brendan,

The point you need to pick up on with WSSF that the architecture is divided into three layers.
  • The Service Interface
  • The Business
  • The Resource Access
If you do it right you will have all your "Use Cases" in your Business Layer. Since the Business Layer is simply a Library, you can connect to this library with your Second App and Make the same calls. Another words simply bypass the Service Interface Layer.

You may want to Repeat the config information in your second app or have them read off a common configuration file.

__Allan