Skip to content

Instantly share code, notes, and snippets.

@amusarra
Created March 28, 2014 09:59
Show Gist options
  • Save amusarra/9829226 to your computer and use it in GitHub Desktop.
Save amusarra/9829226 to your computer and use it in GitHub Desktop.
Listato 4 Esempio di accesso al servizio SOAP tramite il client generato dall’SDK.
public class TestGetUsersCompanyByTagNameService {
static final String LIFERAY_USER_NAME = (System.getProperty("username") != null) ? System
.getProperty("username") : "test@liferay.com";
static final String LIFERAY_USER_PASSWORD = (System.getProperty("password") != null) ? System
.getProperty("username") : "test";
static final String USER_SERVICE = "Portal_UserService";
/**
*
*/
public TestGetUsersCompanyByTagNameService() {
}
public static void main(String[] args) throws Exception, SystemException {
CustomUsersServiceSoapServiceLocator locator = new CustomUsersServiceSoapServiceLocator();
CustomUsersServiceSoap customUsersService = locator
.getPlugin_shirus_labs_liferay_ws_example_CustomUsersService();
((Plugin_shirus_labs_liferay_ws_example_CustomUsersServiceSoapBindingStub) customUsersService)
.setUsername(LIFERAY_USER_NAME);
((Plugin_shirus_labs_liferay_ws_example_CustomUsersServiceSoapBindingStub) customUsersService)
.setPassword(LIFERAY_USER_PASSWORD);
UserSoap[] listUsers = customUsersService.getUsersCompanyByTagName(
10157l, "crm", 0, 0, 10);
for (UserSoap userSoap : listUsers) {
System.out.println("User ScreeName : " + userSoap.getScreenName());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment