Fixed Spring.ServiceModel.ServiceExporter (SPRNET-1416)
This commit is contained in:
@@ -109,8 +109,8 @@ namespace Spring.ServiceModel
|
||||
return objectFactory.GetObject(serviceName) as Type;
|
||||
}
|
||||
|
||||
return new ServiceProxyTypeBuilder(serviceName, objectFactory.GetType(serviceName), useServiceProxyTypeCache)
|
||||
.BuildProxyType(objectFactory);
|
||||
return new ServiceProxyTypeBuilder(serviceName, objectFactory, useServiceProxyTypeCache)
|
||||
.BuildProxyType();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -66,16 +66,8 @@ namespace Spring.ServiceModel
|
||||
se = new ServiceExporter();
|
||||
se.ObjectFactory = objectFactory;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
//SPRNET-1262
|
||||
public void ProxiesDeclarativeAttributeWithConstructorArguments()
|
||||
@@ -98,7 +90,6 @@ namespace Spring.ServiceModel
|
||||
</object>
|
||||
</objects>";
|
||||
|
||||
|
||||
using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(xml)))
|
||||
{
|
||||
objectFactory = new XmlObjectFactory(new InputStreamResource(stream, string.Empty));
|
||||
@@ -131,6 +122,20 @@ namespace Spring.ServiceModel
|
||||
se.AfterPropertiesSet();
|
||||
}
|
||||
|
||||
[Test] // SPRNET-1416
|
||||
public void CallProxy()
|
||||
{
|
||||
se.ObjectName = "ProxiesContractInterface";
|
||||
se.TargetName = "service";
|
||||
se.AfterPropertiesSet();
|
||||
|
||||
Type proxyType = se.GetObject() as Type;
|
||||
Assert.IsNotNull(proxyType);
|
||||
IContract proxy = Activator.CreateInstance(proxyType) as IContract;
|
||||
Assert.IsNotNull(proxyType);
|
||||
Assert.AreEqual("1979", proxy.SomeMethod(1979));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ProxiesContractInterface()
|
||||
{
|
||||
@@ -355,7 +360,6 @@ namespace Spring.ServiceModel
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user