Alessio, The HTTP component uses the AuthenticationService that is configured in the conf/jndi.xml under the key java:comp/env/smx/AuthenticationService. I don't think you can override that at the endpoint level, but you can configure another AuthenticationService in that file and use that for your HTTP endpoint.
Regards, Gert Vanthienen ------------------------ Open Source SOA: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ 2009/5/21 afabiani <[email protected]>: > > Hi all, > > I would like to allow my http-component to use a custom authentication > service in order to make them authenticating against a DB or something else > given a User principal. > > Now, I wrote a test case which allows me to do that: > > 8< > --------------------------------------------------------------------------------------- > securedGeoServerComponent = new HttpComponent(); > > HttpConsumerEndpoint securedGeoServerEndpoint = new > HttpConsumerEndpoint(securedGeoServerComponent.getServiceUnit(), > new QName("http://www.liberologico.com/Ruota/", > "SecuredGeoServer"), > "securedGSEndpoint"); > securedGeoServerEndpoint.setAuthMethod("basic"); > securedGeoServerEndpoint.setDefaultMep(MessageExchangeSupport.IN_OUT); > > securedGeoServerEndpoint.setLocationURI("http://localhost:8192/SecuredGeoServer/"); > securedGeoServerEndpoint.setMarshaler(new GSMarshaler()); > > securedGeoServerEndpoint.setTargetEndpoint("securingGeoServerEndpoint"); > securedGeoServerEndpoint.setTargetService(new > QName("http://www.liberologico.com/Ruota/", "securingGeoServerComponent")); > > securedGeoServerComponent.addEndpoint(securedGeoServerEndpoint); > securedGeoServerComponent.setAuthenticationService(new > SecuredGSAuthService()); > > jbi.activateComponent(securedGeoServerComponent, > "servicemix-secured-gs"); > > 8< > --------------------------------------------------------------------------------------- > > Is there a way to do the same on the xbean.xml files? > > I tryed something like the following without success: > > 8< > --------------------------------------------------------------------------------------- > > <!-- Secured-GeoServer Service --> > <http:component id="servicemix-secured-gs"> > <http:endpoints> > > <http:consumer service="ruota:SecuredGeoServer" > endpoint="securedGSEndpoint" > > locationURI="http://0.0.0.0:8192/SecuredGeoServer/" > authMethod="basic" > > defaultMep="http://www.w3.org/2004/08/wsdl/in-out" > > targetService="ruota:securingGeoServerComponent" > targetEndpoint="securingGeoServerEndpoint" > marshaler="#gsMarshaler" /> > </http:endpoints> > <http:authenticationService><ref > bean="securedGSAuthService"/></http:authenticationService> > </http:component> > > 8< > --------------------------------------------------------------------------------------- > > Thanks in advance, > Alessio. > -- > View this message in context: > http://www.nabble.com/Defining-a-custom-authenticationService-on-xbean.xml-tp23652542p23652542.html > Sent from the ServiceMix - User mailing list archive at Nabble.com. > >
