I’ve modified my original question (hope that’s allowed)…
I have used WCF to expose my Spring Service layer. I have created a WCF project, and for each service interface (IOrderService, ICustomerService etc) in my application, I have created an SVC file and added the appropriate config in web.config. This all works well, and Spring’s dependency injection is working too.
I expect that Spring’s ServiceExporter class can make the process even simpler. But what does it give me that I don’t already have? Does it allow me to achieve the same thing without needing the WCF project? The reason I ask is that most examples I have seen also mention ‘editing .svc files’, which are in the WCF project.
Since the ASMX WebServiceExporter allows me to create a webservice from just my interface(s) and a bit of XML config, I was thinking ServiceExporter would be similar.
OPTIONAL: as an aside, wouldn’t it be better to have just one WebServiceExporter class in Spring and have a property e.g. exportAs=”WCF | ASMX”?
Thanks
First, read this:
http://www.springframework.net/docs/1.2.0-M1/reference/html/wcf-quickstart.html
well, The Host have to reference the exporter object :
Are you referring to the service interface project? if so – spring.net example shows that Spring specific implementation of the WCF interfaces is used within the server project, and are not used in an interface project of it’s own. Also note that the basic WCF service interfaces (System.ServiceModel.Dispatcher.IInstanceProvider and System.ServiceModel.Description.IServiceBehavior ) are encapsulated by Spring.
The example given in the link shows that you don’t need such a project, however the interface is defined within the server project.
Not an option – You can, however, try to use GenerateProxy method of ServiceExporter class:
http://www.springframework.net/docs/1.3.2/api/net-2.0/html/topic16729.html