我正在尝试使用Admin Web服务添加BAM服务器配置文件(在ESB服务器下)。我没有看到在作为独立程序执行时抛出任何错误但是没有添加配置文件。请告知以下步骤是否正确 -
String bamcepServerProfileServiceURL = Constant.SERVICE_URL +“BAMMediatorConfigAdmin”;
BAMMediatorConfigAdminStub stub = new BAMMediatorConfigAdminStub(bamcepServerProfileServiceURL);
ServiceClient client = stub._getServiceClient();
Options option = client.getOptions();
option.setManageSession(true);
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, adminCookie);
BAMMediatorConfigAdminStub.BamServerConfig bamConfig = new BAMMediatorConfigAdminStub.BamServerConfig();
bamConfig.setUsername("admin");
bamConfig.setPassword("admin");
bamConfig.setLoadbalanced(false);
bamConfig.setSecurity(true);
bamConfig.setIp("localhost");
bamConfig.setAuthenticationPort("7611");
BAMMediatorConfigAdminStub.SaveBamServerConfig config = new BAMMediatorConfigAdminStub.SaveBamServerConfig();
config.setBamServerConfig(bamConfig);
stub.saveBamServerConfig(config);
答案 0 :(得分:1)
请检查[1]中的@addResource,它会创建个人资料并调用
stub.saveResourceString(resourceString,bamServerProfileLocation);
通过[2]
中的@saveResourceString