Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Services
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8601/src/Spring/Spring.Web/Web/Services
Modified Files:
WebServiceHandlerFactory.cs
Log Message:
fixed SPRNET-762
Index: WebServiceHandlerFactory.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Web/Web/Services/WebServiceHandlerFactory.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** WebServiceHandlerFactory.cs 24 Oct 2006 03:31:29 -0000 1.11
--- WebServiceHandlerFactory.cs 19 Mar 2008 18:05:08 -0000 1.12
***************
*** 31,34 ****
--- 31,35 ----
using Spring.Context.Support;
using Spring.Util;
+ using Spring.Web.Support;
#endregion
***************
*** 66,77 ****
new AspNetHostingPermission(AspNetHostingPermissionLevel.Minimal).Demand();
! string serviceName = WebUtils.GetPageName(url);
! IApplicationContext appContext = WebApplicationContext.Current;
Type serviceType = null;
! if (appContext.ContainsObjectDefinition(serviceName))
{
! serviceType = appContext.GetType(serviceName);
!
// check if the type defines a Web Service
object[] wsAttribute = serviceType.GetCustomAttributes(typeof(WebServiceAttribute), true);
--- 67,89 ----
new AspNetHostingPermission(AspNetHostingPermissionLevel.Minimal).Demand();
! IConfigurableApplicationContext appContext =
! WebApplicationContext.GetContext(url) as IConfigurableApplicationContext;
!
! if (appContext == null)
! {
! throw new InvalidOperationException(
! "Implementations of IApplicationContext must also implement IConfigurableApplicationContext");
! }
!
! string appRelativeVirtualPath = WebUtils.GetAppRelativePath(url);
!
! AbstractHandlerFactory.NamedObjectDefinition nod =
! AbstractHandlerFactory.FindWebObjectDefinition(appRelativeVirtualPath, appContext.ObjectFactory);
Type serviceType = null;
! if (nod != null)
{
! serviceType = appContext.GetType(nod.Name);
!
// check if the type defines a Web Service
object[] wsAttribute = serviceType.GetCustomAttributes(typeof(WebServiceAttribute), true);
***************
*** 79,83 ****
{
serviceType = null;
! }
}
--- 91,95 ----
{
serviceType = null;
! }
}
|