Hi,

 I'm facing a problem with basic authentication when consuming a service
with CXF.

Currently the cxf-configuration XML contains these lines for each
service my client is invoking:

 

<http-conf:authorization>

                        <UserName
xmlns="http://cxf.apache.org/configuration/security";>@@username@@</UserN
ame>

                        <Password
xmlns="http://cxf.apache.org/configuration/security";>@@password@@</Passw
ord>

    </http-conf:authorization>

 

The tokens @@username@@ and @@password@@ are replaced by the classoader
(loading the resource) to allow

dynamic configuration. This is required because the consumed services
can be deployed on different servers having

different security settings (user credentials). I have not yet found a
way to accomplish this with CXF which is not requiring

the classloader workaround.

 

This is how I instantiate the service-consumer:

 

new
MyService(ReplacingClassloader.getInstance().getResource("wsdl/myservice
/main.wsdl"),

new QName("urn:MyServiceWsd", "MyService"););

 

Any ideas how this can be done programmatically ?

 

Regards,

Frederic

 

_________________________________________________________________________

SEEBURGER AG                            Vorstand/Seeburger Executive Board:
Sitz der Gesellschaft/                  Bernd Seeburger, Axel Haas, Michael 
Kleeberg
Registered Office:
Edisonstrasse 1                         Vorsitzender des 
Aufsichtsrats/Chairperson of
D-75015 Bretten                         the Seeburger Supervisory Board:
Tel.: 07252 / 96-0                      Dr. Franz Scherer
Fax:  07252 / 96-2222
Internet: http://www.seeburger.de       Registergericht/Commercial Register:
e-mail: [EMAIL PROTECTED]               HRB 240708 Mannheim
_________________________________________________________________________

Dieses E-Mail ist nur fur den Empfanger bestimmt, an den es gerichtet 
ist und kann vertrauliches bzw. unter das Berufsgeheimnis fallendes
Material enthalten. Jegliche darin enthaltene Ansicht oder Meinungs-
au?erung ist die des Autors und stellt nicht notwendigerweise die
Ansicht oder Meinung der SEEBURGER AG dar.
Sind Sie nicht der Empfanger, so haben Sie diese E-Mail irrtumlich
erhalten und jegliche Verwendung, Veroffentlichung, Weiterleitung,
Abschrift oder jeglicher Druck dieser E-Mail ist strengstens untersagt.
Weder die SEEBURGER AG noch der Absender (Frederic Bitsch)
ubernehmen die Haftung fur Viren; es obliegt Ihrer Verantwortung,
die E-Mail und deren Anhange (0) auf Viren zu prufen.

The present email addresses only the addressee which it targets and
may contain confidential material that may be protected by the
professional secret. The opinions reflected herein are not necessarily
the one of the SEEBURGER AG.
If you are not the addressee, you have accidentally got this email and
are not enabled to use, publish, forward, copy or print it in any way.
Neither the SEEBURGER AG, nor the sender (Frederic Bitsch) are
liable for viruses, being your own responsibility to check this email
and its attachments (0) for this purpose.
_________________________________________________________________________

Reply via email to