Accessing the API with Java

Requeriments

Cube Panel's API access library also includes following libraries that are needed to access Web Services:

La clase WSAccess

This class provides access to Cube Panel servers and configures connection: Constructor has following definition:

WSAccess access = new WSAccess(user_name, password, wsdl_url, endpoint, id_language)

Using WebServices

Once a WSAccess class request is obtained, a CubePanelWSBindingStub object is needed. WSAccess class provides a method to get a CubePanelWSBindingStub instance:

             

                WSAccess a = new WSAccess("admin", "123456",                

                        "file:///C:/cubeservices/cubeservices.wsdl", "https://127.0.0.1:25112/modules/cubeservices.php",

                        WSAccess.CUBE_PANEL_LANG_ENGLISH);                        

                        

                CubePanelWSBindingStub bs = a.getUser("admin");

                

                ClientInfo clients[] = bs.ADMINCLIENTS_GetClients(null, null, null);

            

The param that is passed to getUser method is the name of the user who is going to be used to make the call.

Another methods and members of WSAccess

WSAccess class has defined also following methods:

These are the constants defined in WSAccess class: