Skip to content

Instantly share code, notes, and snippets.

@skihero
Created March 2, 2011 09:43
Show Gist options
  • Save skihero/850699 to your computer and use it in GitHub Desktop.
Save skihero/850699 to your computer and use it in GitHub Desktop.
create sipx user wsdl
PBXService
----------------------------------------------------------------------------------------------------
Generate the Webservices stubs from the wsdl file given in the sipx site.
CreateUser should be written like this
/* Read the credentials from somewhere */
/* From global.xml file that our ConfReader will handle */
String credentials = "superadmin:12345";
// create the EndpointObject
EndPoint ep = new EndPoint("https", credentials,
"10.20.20.1x",
"8443" ,
"/sipxconfig/services/" );
/* Define User Object params */
String [] groups , permissions, aliases ;
aliases = new String [2];
groups = new String [1];
permissions = new String [1];
aliases[0] ="k";
aliases[1] ="k";
groups[0] = "soap_test";
permissions[0]="LongDistanceDialing"; // the permission names were obtained from
// /var/sipxdata/sipdb/permission.xml
// Create the user Object
User usr = new User(
"kish", "1234", "k", "kis", "1111", aliases, "kishore.kumar@domainuc.com",
groups, permissions);
System.out.println("user: " + usr);
// Create the userService
UserService us = new UserServiceProxy(ep.EndPointURL + "UserService");
System.out.println("User serv: " + us);
// Add the defined user and the PIN
// Exception generated while user creation
us.addUser(new AddUser(usr, "1234"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment