1 /*
2 Copyright (C) 2000 - 2007 Grid Systems, S.A.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2, as
6 published by the Free Software Foundation.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
17 package com.gridsystems.innergrid.api;
18
19 import org.apache.axis.AxisFault;
20 import org.apache.ws.axis.security.WSDoAllSender;
21 import org.apache.axis.MessageContext;
22
23 import java.util.ResourceBundle;
24
25 /**
26 * This handler does not require a user alias be specified in the server deployment file
27 * as it is already available from the crypto object. This is a rewritten version of AK's
28 * code, which subclasses WSDoAllSender instead of copying all the code in here.
29 */
30 public class WSOutboundHandler extends WSDoAllSender {
31
32 /**
33 * {@inheritDoc}
34 */
35 @Override
36 public void invoke(MessageContext mc) throws AxisFault {
37 ResourceBundle bundle = null;
38 bundle = ResourceBundle.getBundle("crypto");
39 mc.setUsername(bundle
40 .getString("org.apache.ws.security.crypto.merlin.keystore.alias"));
41
42 super.invoke(mc);
43 }
44 }