cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service to do Java PDK .setProperty() and .store()

Former Member
0 Kudos

I had posted this in the EP Content Development group, but received no response. Sorry for the cross post but this is relatively urgent for me.

I am working on a Portal Component in the PDK for .NET which will take values selected from a CheckBoxGroup, concatenate it to a string and write that to a single Personalization preference.

However, the PDK for .NET does not support writing Personalization preferences to the PCD. Thus, I have determined the solution to be:

Make a Portal Service that takes a value and writes it to the Personalization of an iView. Basically it needs to simply do a:

IPortalComponentProfile profile = 
request.getComponentContext().getProfile;
profile.setProperty("selectedVal", myData);
profile.store();

Then this will be converted to a Web Service. However, how will the Web Service know what iView its writing Personalization for?

I've searched and searched and come up with little clues here and there that I've somewhat pieced together but no concrete solutions. Please help. Thanks! --Shibli

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I took a look at the portal javadoc and there is another getComponentContext method that gets a string, urn, perhaps that will help.

Take a look <a href="https://media.sdn.sap.com/javadocs/NW04/SP12/runtime/com/sapportals/portal/prt/component/IPortalComponentRequest.html#getComponentContext(java.lang.String)">here.</a>

Regards,

Tsachi

Former Member
0 Kudos

Tsachi, I'm not sure that IPortalRequest will be accessible from a Web Service. I'll try this

IPortalComponentRequest request =
(IPortalComponentRequest) this.getRequest();
IPortalComponentResponse response =
(IPortalComponentResponse) this.getResponse();

I'll see if that works and let you know.

Thanks a bunch, man! --Shibli