View Full Version : How to configure Spring web service to support WSE 3.0
bernad
05-24-2006, 02:42 PM
Dear All,
In my project i want to expose my PONO object as web service. And it's sucessfully done. But it's still traditional web service.
My question, How to configure spring web service (especially PONO object) to support WSE 3.0?
Thank you,
Bernad
Bruno Baia
05-26-2006, 12:31 AM
Hi Bernad,
I uploaded a sample of WSE2 integration ( mainly for .NET 1.1 but still works on 2.0) in the forum questions wiki page (http://opensource.atlassian.com/confluence/spring/display/NET/Forum+Questions).
Here is the concept that can be applied to WSE3 :
By default, WebServiceClientFactory uses the 'SoapHttpClientProtocol' class from System.Web.Services.dll as a base class for the created proxy.
But you can change it, using the 'ClientProtocolType' property, to use the one provided by WSE.
Here is an example with WSE2 :
<object id="calculatorWebServiceWse" type="Spring.Web.Services.WebServiceClientFactory, Spring.Services">
<property name="ClientProtocolType" value="Microsoft.Web.Services2.WebServicesClientProtocol, Microsoft.Web.Services2" />
<property name="ServiceUrl" value="http://localhost/Calculator.Web/calculatorServiceWse.asmx" />
<property name="ServiceInterface" value="Calculator.Contract.ICalculator, Calculator.Contract" />
</object>
So now u can manipulate WSE's entities doing this :
proxy = (Microsoft.Web.Services2.WebServicesClientProtocol ) ctx.GetObject("calculatorWebServiceWse");
proxy.RequestSoapContext.Security.Tokens....
WSE integration consists on Advices that intercept method calls to do the wished behavior keeping the service and client code clean.
Cheers,
Bruno
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.