Foren

Porting WS calls from 5.2.2 to 5.2.3 (ie. addGroup)

gianluca maranzana, geändert vor 14 Jahren.

Porting WS calls from 5.2.2 to 5.2.3 (ie. addGroup)

Junior Member Beiträge: 26 Beitrittsdatum: 30.07.08 Neueste Beiträge
Hi,

I'm doing this "simple" migration, but in the case of subject, now calling addGroup I need to include serviceContext as a new parameter.

in this page Web services - Manage Users... i've found an example that the "addOrganization" is commented:
		// ServiceContext scxt = new ServiceContext();
		// OrganizationSoap org = soap.addOrganization(parentOrgId, "testOrg-MyOrg_Admin", 
                      //"regular-organization", recursable, regionId, countryId, statusId, "My Comments", scxt);
		// long users[] = {userId};
		// soapUser.addOrganizationUsers(org.getOrganizationId(), users);
		// soap.deleteOrganization(10232);

May I pass a serviceContext empty for this call or where I can retrieve it?

tnx
thumbnail
Shagul Khaja, geändert vor 14 Jahren.

RE: Porting WS calls from 5.2.2 to 5.2.3 (ie. addGroup)

Liferay Master Beiträge: 758 Beitrittsdatum: 27.09.07 Neueste Beiträge
gianluca maranzana:
Hi,

I'm doing this "simple" migration, but in the case of subject, now calling addGroup I need to include serviceContext as a new parameter.

in this page Web services - Manage Users... i've found an example that the "addOrganization" is commented:
		// ServiceContext scxt = new ServiceContext();
		// OrganizationSoap org = soap.addOrganization(parentOrgId, "testOrg-MyOrg_Admin", 
                      //"regular-organization", recursable, regionId, countryId, statusId, "My Comments", scxt);
		// long users[] = {userId};
		// soapUser.addOrganizationUsers(org.getOrganizationId(), users);
		// soap.deleteOrganization(10232);

May I pass a serviceContext empty for this call or where I can retrieve it?

tnx



You could probably pass a new serviceContext with nothing in it as shown in the commented code.

There may be certain cases where the serviceContext needs to be populated with some values the localServiceImpl is expecting as pointed out in the below post.

http://www.liferay.com/community/forums/-/message_boards/message/4445687

You may want to look into the serviceImpl's and localServiceImpl's to see if you miss anything.

Best Regards,
Shagul
gianluca maranzana, geändert vor 14 Jahren.

RE: Porting WS calls from 5.2.2 to 5.2.3 (ie. addGroup)

Junior Member Beiträge: 26 Beitrittsdatum: 30.07.08 Neueste Beiträge
tnx Shagul for confirm.

When I'll do final tests, I'll report here if ServiceContext need to be pre-filled in my case.