-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Anthony, Sean,
Please raise a stink on rampart-dev@ that these should not be remove in a
future version and should not be marked
deprecated :)
Thanks,
dims
PS: Background, There are some people who don't listen to logic and wanted to
get rid of these useful API's...
Anthony Bull wrote:
| We've got the same problem in production. It basically isn't a risk
| unless you upgrade to a future version of Axis 2/Rampart that they have
| decided to remove those classes or the functionality they provide is
| turned off.
| To minimise the effect of this, all our production web services and web
| clients (we have 5 independent axis 2 web services running in
| production) use the same re-usable security library that abstracts the
| rampart configuration code. So, when we change the ouflowConfiguration
| code, we only need to rebuild that jar and re-release it, instead of
| having to do full release builds of all our web services.
|
| Sean Conlon wrote:
|> I am using the deprecated class OutflowConfiguration in order to set my
|> dynamic usernames and passwords in the OutflowSecurity parameter. Below
|> are the methods that I use to do this.
|> What is an alternative approach for me to set my username and password
|> dynamically? What are my risks with launching this into production with
|> a deprecated class?
|> This may be more specific to Rampart then Axis2, but I am hoping that
|> someone else has had this issue too. Others have documented this
|> problem, but I have not found a viable solution.
|> Thanks!
|> ////////////////////////////////////////////////////////
|> //////////////////////// getStub () ////////////////////
|> ////////////////////////////////////////////////////////
|> private PartnerAPIStub getStub() throws EmailException {
|> PartnerAPIStub myStub = null;
|>
|> try {
|> EndpointReference endPointReference = new
|> EndpointReference(endpoint);
|> ConfigurationContext configurationContext =
|> ConfigurationContextFactory.createConfigurationContextFromFileSystem(
|> null, ABSOLUTE_AXIS2_CLIENT_CONFIG_PATH);
|>
|> myStub = new PartnerAPIStub(configurationContext, endpoint);
|> ServiceClient serviceClient = myStub._getServiceClient();
|>
|> Options options = serviceClient.getOptions();
|>
|> options.setTo(endPointReference);
|>
|> this.updateOutflowSecurity(myStub);
|> }
|> catch (AxisFault e) {
|> // TODO JL - temp code
|> throw new EmailException(e);
|> }
|>
|> return myStub;
|> }
|>
|> ////////////////////////////////////////////////////////
|> ////////////////// updateOutflowSecurity() /////////////
|> ////////////////////////////////////////////////////////
|> private void updateOutflowSecurity(PartnerAPIStub stub) {
|>
|> ServiceClient serviceClient = stub._getServiceClient();
|> Options options = serviceClient.getOptions();
|>
|> OutflowConfiguration ofc = new OutflowConfiguration();
|> ofc.setActionItems("UsernameToken");
|> ofc.setUser(apiUsername);
|> ofc.setPasswordType("PasswordText");
|>
|> options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,
|> ofc.getProperty());
|>
|> //pwcbhandler is of type PWCBHandler that is injected via
|> Spring options.setProperty(WSHandlerConstants.PW_CALLBACK_REF,
|> pwcbhandler);
|> }
|>
|> ---------------------------------------------------------------------
|> To unsubscribe, e-mail: [EMAIL PROTECTED]
|> For additional commands, e-mail: [EMAIL PROTECTED]
|>
|>
|>
|>
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
iD8DBQFIBpt9gNg6eWEDv1kRAsyoAKDfwCuYBUzXdsj7aS3UqZ5Zq4+ylwCfaf9K
7C6gjnRqIqXt/Gu80rDgoSY=
=4NRi
-----END PGP SIGNATURE-----