Hi,

I tried to provide the userToken auth info in the following way, but did not 
succeed, since the soap header is still missing in the request:

String serviceUrl = <myServiceEndpoint>;
String repository = <myRepositoryPath>;
ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(repository,
 null);
MyServiceStub stub = new MyServiceStub(ctx, serverUrl);
ServiceClient serviceClient = stub._getServiceClient();
serviceClient.engageModule("rampart");
Options options = serviceClient.getOptions();
options.setUserName("user");
options.setPassword("pass");

Any ideas or should this issue be posted on the rampart list?

best regards
Werner





----- Ursprüngliche Mail ----
Von: Werner Heinsohn <[email protected]>
An: [email protected]
Gesendet: Freitag, den 27. März 2009, 16:57:19 Uhr
Betreff: configure client.axis2.xml programmically


Hi,

I'm using a axis2 client using WS-Security/rampart for authenticating the user, 
but right now it's done by generating a context with the "client.axis2.xml". Is 
it possible (and how) to configure this programmically, aka not needing to use 
the client.axis2.xml?

Important part of the "client.axis2.xml":

  <module ref="rampart" />
  <parameter name="OutflowSecurity">
      <action>
        <items>UsernameToken</items>
        <user>user</user>
        <password>pass</password>
        <passwordType>PasswordText</passwordType>
      </action>
    </parameter>


thanks and best regards
Werner



Reply via email to