I'm running this all on the same server in a development VM. Also please note that I'm using SPG2007 for this test.
I've created a test project as follows:
- ServiceLocatorTestCommon: Contains IFruitProvider interface with AppleProvider and BananaProvider. Consists of a GetFruit() method returning a simple string.
- ServiceLocatorTest: WSPBuilder project that contains a SOAP web service. The service gets the current instance of IFruitProvider from the service locator and returns the output from GetFruit().
- ServiceLocatorTestConsole: Registers the IFruitProvider to use with the service locator and then calls the web service.
When running the console app I get:
System.Web.Services.Protocols.SoapException: Server was unable to process reques t. ---> Activation error occured while trying to get instance of type IFruitProv ider, key "" ---> No type mapping was registered for type 'IFruitProvider' and
k ey ''. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClie ntMessage message, WebResponse response, Stream responseStream, Boolean asyncCal l) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodN ame, Object
parameters) at ServiceLocatorTestConsole.TestWebSvc.TestWebService.Hello() in C:\Projects \ServiceLocatorTest\ServiceLocatorConsole\Web References\TestWebSvc\Reference.cs :line 78 at ServiceLocatorTestConsole.Program.Main(String args) in C:\Projects\Servi
Why wouldn't this work?
It looks like I can't attach the example project to the discussion but I can e-mail it if wanted.
Thanks for the help, Alex.