For asmx web services In the past (pre .Net FX 3.0 being released) Ive
normally broken out the service into an abstract base class with constructor
based dependencies, and a concrete asmx web service implementation that
grabs all the dependencies via calls to a static container its not too
resilient, but it does the trick i.e.
public class MyService : AbstractMyService
{
public MyService()
: base(IoC.Resolve<IDependency1>(),
IoC.Resolve<IDependency2>())
{
main reason being that I can create another concrete implementation of
the service for testing where I can inject mocks for the dependencies
this
doesnt allow you to create the service itself via the container of course,
but you could use an interface and implement the concrete service as a
decorator for an internal implementation of your services interface which
is created via the container, so you could take advantage of things like AOP
-Youre still stuck with having to use a static reference to your container
of course, but thats often not a problem...
Chez,
- Alex
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Craig Neuwirt
Sent: Monday, 27 November 2006 8:58 a.m.
To: castleproject-users@lists.sourceforge.net
Subject: Re: [Castle-users] Webservice and MonoRail
Unfortunately, I think the plumbing used by ASP.NET to expose asmx web
services is too private to be able to
allow the Web Service components to be created through the container.
Cheers,
craig
On 11/26/06, Ivan Porto Carrero <[EMAIL PROTECTED]> wrote:
I'm guessing same deal there. Haven't tried it yet I just went for WCF since
it's a new project.
But all castle does is when your application starts it's fills the container
with instances of the objects that are in the config files
So if you register your WS class it will figure it out that it has those
dependencies
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] ] On Behalf Of
Craig Neuwirt
Sent: Monday, 27 November 2006 8:32 a.m.
To: castleproject-users@lists.sourceforge.net
Subject: Re: [Castle-users] Webservice and MonoRail
What about standard .asmx Web Services?
On 11/26/06, Ivan Porto Carrero <[EMAIL PROTECTED]> wrote:
Just setup a constructor on you object and register your components in your
config. I use WCF services like that :
[ServiceBehavior(Name = "WorkRequestService", Namespace = "
<http://stdc.datapoint.co.nz/> http://stdc.datapoint.co.nz/",
ConfigurationName = "WorkRequestService")]
[AspNetCompatibilityRequirements(RequirementsMode =
AspNetCompatibilityRequirementsMode.Allowed)]
public class WorkRequestService : WorkRequestServiceContract
{
private readonly IWorkRequestBridge bridgeService;
private readonly IApiAuthorization apiAuthorizationService;
public WorkRequestService(IWorkRequestBridge bridgeService,
IApiAuthorization apiAuthorizationService)
{
this.bridgeService = bridgeService;
this.apiAuthorizationService = apiAuthorizationService;
}
That is
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] ] On Behalf Of
Craig Neuwirt
Sent: Monday, 27 November 2006 8:26 a.m.
To: castleproject-users@lists.sourceforge.net
Subject: Re: [Castle-users] Webservice and MonoRail
Have you discovered a way to have the Web Services support dependency
injection?
I tried to use reflector to determine if custom handler factories would
work, but it seemed
that the appropriate hooks are not publically available.
On 11/26/06, Henry Conceição <[EMAIL PROTECTED]> wrote:
Monorail don't have a built in WebService support, but you can use the asmx
framework to expose your services.
On 11/25/06, Mircea Jivoin < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
wrote:
Hi all,
Is there a way to expose webservice component in MonoRail?
Can you give me some examples?
Thanks,
Mircea
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
&p=sourceforge&CID=DEVDEV
_______________________________________________
CastleProject-users mailing list
CastleProject-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/castleproject-users
--
Cheers,
Henry Conceição
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
&p=sourceforge&CID=DEVDEV
_______________________________________________
CastleProject-users mailing list
CastleProject-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/castleproject-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
&p=sourceforge&CID=DEVDEV
_______________________________________________
CastleProject-users mailing list
CastleProject-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/castleproject-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
&p=sourceforge&CID=DEVDEV
_______________________________________________
CastleProject-users mailing list
CastleProject-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/castleproject-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
CastleProject-users mailing list
CastleProject-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/castleproject-users