Combination View Flat View Tree View
Threads [ Previous | Next ]
Damayanthi Herath
"UserService is not set" exception while accessing Liferay webservices
March 3, 2013 9:03 PM

Damayanthi Herath

Rank: New Member

Posts: 1

Join Date: March 3, 2013

Recent Posts


I am trying to access Liferay provided web services as per below :

UserServiceSoapServiceLocator locatorUser = new UserServiceSoapServiceLocator();
UserServiceSoap serviceUser = locatorUser.getPortal_UserService(URL for Portal_UserService);
System.out.println(serviceUser.getUserByEmailAddress(10112, ""));

I am using Liferay 5.2 and when I try to execute above code, I get the following exception.

java.lang.RuntimeException: UserService is not set
at com.liferay.portal.service.UserServiceUtil.getService(
at com.liferay.portal.service.UserServiceUtil.getUserByEmailAddress(
at com.test.ClientService.main(

I am grateful if any body could enlighten me on how to resolve this error since I could not find any hint on it.