Created
March 28, 2014 09:59
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestGetUsersCompanyByTagNameService { | |
static final String LIFERAY_USER_NAME = (System.getProperty("username") != null) ? System | |
.getProperty("username") : "[email protected]"; | |
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