0

I am trying to add BAM server profile (under ESB server) using Admin Web services. I am not seeing any error thrown while executing as standalone program but profile is not getting added. Please advise if below steps are correct -

  1. Get admin cookie by connecting to "AuthenticationAdmin" URL
  2. Create stubs using wsdl2java from "BAMMediatorConfigAdmin" WSDL
  3. String bamcepServerProfileServiceURL = Constant.SERVICE_URL + "BAMMediatorConfigAdmin";

    BAMMediatorConfigAdminStub stub = new BAMMediatorConfigAdminStub(bamcepServerProfileServiceURL);

  4.                 ServiceClient client = stub._getServiceClient();
            Options option = client.getOptions();
            option.setManageSession(true);
            option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, adminCookie);
    
  5.                 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);
    
4