/* 236 */ String opName = null;
/* 237 */ OperationMetaData opMetaData = ctx.getOperationMetaData();
/* 238 */ if (opMetaData != null) {
/* 239 */ opName = opMetaData.getQName().toString();
/* */ }
/* 241 */ Config opConfig = getConfig(config, port, opName);
/* 242 */ log.debug("WS-Security config: " + opConfig);
/* */
/* 245 */ if (opConfig == null) {
/* 246 */ return;
/* */ }
/* 248 */ ArrayList operations = new ArrayList();
/* 249 */ Timestamp timestamp = opConfig.getTimestamp();
/* 250 */ if (timestamp != null)
/* */ {
/* 252 */ operations.add(new OperationDescription(TimestampOperation.class, null, null, timestamp.getTtl(), null));
/* */ }
/* */
/* 255 */ if (opConfig.getUsername() != null)
/* */ {
/* 257 */ Object user = ctx.get("javax.xml.rpc.security.auth.username");
/* 258 */ Object pass = ctx.get("javax.xml.rpc.security.auth.password");
/* */
/* 260 */ if ((user == null) && (pass == null))
/* */ {
/* 262 */ user = ctx.get("javax.xml.ws.security.auth.username");
/* 263 */ pass = ctx.get("javax.xml.ws.security.auth.password");
/* */ }
/* */
/* 266 */ if ((user != null) && (pass != null))
/* */ {
/* 268 */ operations.add(new OperationDescription(SendUsernameOperation.class, null, user.toString(), pass.toString(), null));
/* 269 */ ctx.put("org.jboss.ws.authType", "org.jboss.ws.authType.wsse");
/* */ }
/* */ }
/* */
/* 273 */ Sign sign = opConfig.getSign();
/* 274 */ if (sign != null)
/* */ {
/* 276 */ List targets = convertTargets(sign.getTargets());
/* 277 */ if (sign.isIncludeTimestamp())
/* */ {
/* 279 */ if (timestamp == null) {
/* 280 */ operations.add(new OperationDescription(TimestampOperation.class, null, null, null, null));
/* */ }
/* 282 */ if ((targets != null) && (targets.size() > 0)) {
/* 283 */ targets.add(new WsuIdTarget("timestamp"));
/* */ }
/* */ }
/* 286 */ operations.add(new OperationDescription(SignatureOperation.class, targets, sign.getAlias(), null, null));
/* */ }
/* */
/* 289 */ Encrypt encrypt = opConfig.getEncrypt();
/* 290 */ if (encrypt != null)
/* */ {
/* 292 */ List targets = convertTargets(encrypt.getTargets());
/* 293 */ operations.add(new OperationDescription(EncryptionOperation.class, targets, encrypt.getAlias(), null, encrypt.getAlgorithm()));
/* */ }