void addToConfig(String webServiceName, Map<String, String> published){//String[] registryLocations) {
if(webServiceInfoMap == null){
_logger.fine("ConfigHelper.addToConfig : Incorrect webServiceName ");
return;
}
final DomainConfig dc = this.getDomainConfig();
String appId = (String)webServiceInfoMap.get(
WebServiceEndpointInfo.APP_ID_KEY);
Boolean isStandAlone = (Boolean)webServiceInfoMap.get(
WebServiceEndpointInfo.IS_STAND_ALONE_MODULE_KEY);
String appName = appId;
String pureWebServiceName = dropAppNameFromWebServiceName(webServiceName);
String underScoredWebServiceName =
convertHashesToUnderScores(webServiceName);
WebServiceEndpointConfig wsec = null;
if(!isStandAlone) {
Map <String, J2EEApplicationConfig> map =
dc.getJ2EEApplicationConfigMap();
J2EEApplicationConfig appConfig = map.get(appName);
if (appConfig == null) {
// this will never happen as this created by deployment
_logger.log(Level.FINE, "Could not find an application with " +
" name = "+appName);
} else {
Map <String, WebServiceEndpointConfig> wsmap =
appConfig.getWebServiceEndpointConfigMap();
wsec = wsmap.get(pureWebServiceName);
if (wsec == null){
wsec = appConfig.createWebServiceEndpointConfig(
pureWebServiceName, null);
wsec.setJBIEnabled(false);
}
for (String jndiname : published.keySet()){
appConfig.createProperty(jndiname+"__"+
underScoredWebServiceName,
published.get(jndiname));
}
}
} else {
String type = (String)webServiceInfoMap.
get(WebServiceEndpointInfo.SERVICE_IMPL_TYPE_KEY);
if(type.equals(WebServiceEndpointInfo.EJB_IMPL)){
Map <String, EJBModuleConfig> map
= dc.getEJBModuleConfigMap();
EJBModuleConfig ejbConfig = map.get(appName);
if (ejbConfig == null) {
// should never happen
_logger.log(Level.FINE, "Could not find a ejb module" +
" with name = "+appName);
} else{
Map <String, WebServiceEndpointConfig> ejbmap =
ejbConfig.getWebServiceEndpointConfigMap();
wsec = ejbmap.get(pureWebServiceName);
if (wsec == null){
wsec = ejbConfig.createWebServiceEndpointConfig(
pureWebServiceName, null);
wsec.setJBIEnabled(false);
}
for (String jndiname : published.keySet()){
ejbConfig.createProperty(jndiname+"__"+
underScoredWebServiceName,
published.get(jndiname));
}
}
} else if(type.equals(WebServiceEndpointInfo.SERVLET_IMPL)){
Map <String, WebModuleConfig> map =
dc.getWebModuleConfigMap();
WebModuleConfig webConfig = map.get(appName);
if (webConfig == null){
// should never happen
_logger.log(Level.FINE, "Could not find a web module" +
" with name = "+appName);