PDA

View Full Version : WebServiceProxyFactory can't load the ServiceInterface


Alistair
06-15-2005, 04:43 AM
I'm trying to use Spring to add the service interface to the WSDL generated proxy classes. My context is setup as:


<objec! id="messageStoreService" type="Spring.Web.Services.WebServiceProxyFactory, Spring.Services">
<property name="ProxyClass"><value>Test.Delegates.Proxies.Local.MessageStoreService, Test.Delegates.Proxies</value></property>
<property name="ServiceInterface"><value>Test.Services.IMessageStoreService, Test.Services</value></property>
</object>


But no matter what I try, I get the following exception:

[FatalObjectException: Could not instantiate type [Spring.Context.Support.WebApplicationContext]; because the constructor threw an exception - Error creating object with name 'messageStoreService' defined in 'assembly [Test.Web, Version=1.0.0.2, Culture=neutral, PublicKeyToken=null], resource [Test.Web.Spring.Services.xml] line 6' : Error setting property values: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are:
[Spring.Objects.TypeMismatchException: Cannot convert property value of type [String] to required type [System.Type] for property 'ServiceInterface', Inner Exception: System.TypeLoadException: Could not load type : Test.Services.ITestService, Test.Services
at Spring.Util.TypeResolver.Resolve(String typeName)
at Spring.Util.CachedTypeResolver.Resolve(String typeName)
at Spring.Objects.ObjectUtils.ResolveType(String typeName)
at Spring.Objects.TypeConverters.RuntimeTypeConverter .ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(Ob ject value)
at Spring.Objects.ObjectWrapper.DoTypeConversionIfNec essary(String propertyName, String fullPropertyName, Object oldValue, Object newValue, Type requiredType)]]
Spring.Web.Support.PageHandlerFactory.GetHandler(H ttpContext context, String requestType, String url, String path) +166
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep.Execute() +95
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +173


Is there something basic that I'm missing? If I change the ServiceInterface to a non-existant type, I get the same error so it seems pretty clear that it really can't load my interface. If I manually change the WSDL.exe generated proxy to add the interface then I can create it (using "new" rather than Spring) and everything works fine.

Alistair
06-15-2005, 05:13 AM
Ha!!! Ignore this - I had a spelling mistake in one of the assembly names (not the Spring XML file but in the assembly itself!).