WebServiceConfigImpl nwsc = null;
if ( newBean == null) {
if ( ! isRemove) {
// only remove operation can not have
// new element in the new config context
throw new AdminEventListenerException();
} else {
nwsc = wsc;
}
} else {
nwsc = new WebServiceConfigImpl(
(WebServiceEndpoint) newBean.parent());
}
if ( tf == null) {
// create new filter to handle transformation
tf = (TransformFilter) trh.registerFilter(wsc);
} else {
if ( isRemove) {
String applyTo = tr.getApplyTo();
if ( applyTo.equals(Constants.BOTH) ||
applyTo.equals(Constants.REQUEST)) {
com.sun.enterprise.admin.wsmgmt.config.spi.TransformationRule[] rtrs =
nwsc.getRequestTransformationRule();
tf.resetRequestChain( pruneList( rtrs,
tr.getName()));
}
if ( applyTo.equals(Constants.BOTH) ||
applyTo.equals(Constants.RESPONSE)) {
com.sun.enterprise.admin.wsmgmt.config.spi.TransformationRule[] rtrs =
nwsc.getResponseTransformationRule();
tf.resetResponseChain( pruneList( rtrs,
tr.getName()));
}
} else {
tf.resetRequestChain(
nwsc.getRequestTransformationRule());
tf.resetResponseChain(
nwsc.getResponseTransformationRule());
}
}
}
} catch (Exception e) {
throw new AdminEventListenerException(e);
}
}