PDA

View Full Version : Spring.NET WebService and WSE 3.0


Vladosha
10-24-2006, 08:09 AM
Hello!

I tried to use WebService with WSE 3.0 and Spring.NET.
The article is at http://forum.springframework.net/archive/index.php/t-485.html

But when I configured and started the project got an exception:

Cannot create an instance of an interface SearchAdapter.ISearchAdapter. Please specify a concrete implementation of the interface instead.

I followed the instruction and have got another surprise:

Error creating object with name 'ServiceWse' defined in 'config [objects]' : Initialization of object failed : ServiceInterface must be an interface

What may be a problem?

Thanks in advance!

Bruno Baia
10-24-2006, 09:47 AM
Hi,

which version are you using and can you post your configuration code, It would be useful to help you.

Cheers,
Bruno

Vladosha
10-27-2006, 10:32 AM
Hello, Bruno!

If there any other way to make Spring Web-Service secure, I would not use WSE.

As I understand I can use IIS authorization. In this case I can call service like this:


Spring.Web.Services.WebServiceClientFactory serviceFactory = new Spring.Web.Services.WebServiceClientFactory();
serviceFactory.ServiceUrl = url;
serviceFactory.ServiceInterface = typeof(IAdapter);
serviceFactory.Username = userName;
serviceFactory.Password = password;


Am I right?

But if I want to use my own authorization, is the only way to code Advice?
Are there any other ways?

Thanks in advance!

Bruno Baia
10-27-2006, 08:31 PM
Hi,


As I understand I can use IIS authorization. In this case I can call service like this:
[...]
Am I right?

Yep, there is also a 'Domain' property if needed.



But if I want to use my own authorization, is the only way to code Advice?
Are there any other ways?

Using Aop is the nice way to manage authentification and keep the code clean.
For an example, download one of the latest nightly build (http://www.springframework.net/downloads/nightly/) and take a look the WSE2 integration sample under 'sandbox\Integrations\Spring.Web.Services2'.


You can also use the SoapHeader class (http://msdn2.microsoft.com/en-us/library/system.web.services.protocols.soapheader.aspx), but it's not supported by WebServiceClientFactory.


Hope this helps,
Bruno