I'm not sure what you are trying to do exactly... What do you mean by "backing file"?
Note that anything that is not in the WSRP messages sent by the consumer will not be passed to the producer. Any attempts to modify the request on the consumer side of things will not result in anything interesting on the producer if these modifications are not conveyed to the WSRP messages.
Hi, im trying to pass parameters from the portal to portlets, for example, when an end user log on in the portal, the user get an id (an id session for example), i need to pass this id to the portlet, my consumer is bea and im using a backing file like:
my backing file only contain :
public class CustomDataBacking extends AbstractJspBacking
public boolean preRender(HttpServletRequest request,
in the producer in the method doView i try to get this value with:
protected void doView(RenderRequest rRequest, RenderResponse rResponse)
throws PortletException, IOException, UnavailableException
String value=(String) rRequest.getParameter("zipCode");
but value is null.
exist other method to do this?
thanks for you help
I am not familiar with BEA's custom data transfer feature. From the brief look I took at the document, it seems to rely on mechanisms proprietary to BEA and outside of WSRP's scope. It's therefore no surprise that it wouldn't work with a non-BEA producer such as JBoss Portal. I suspect that the extra data is passed as extensions in the WS messages, though I cannot tell for sure that this is the case. You might be able to do something similar using a standard JAX-RPC Handler to achieve the result you desire.
Hi, Thanks for your reply!, a last question, using Jboss portal, in both side(producer and consumer), exists any procedure to send parameters from the consumer to producer, for example an user id?
Thanks a lot for your help!
I suspect that the extra data is passed as extensions in the WS messages, though I cannot tell for sure that this is the case. You might be able to do something similar using a standard JAX-RPC Handler to achieve the result you desire.
thanks for this hint! you are right, I tested this in a WLP 10.2 consumer - JBoss Portal 2.6.4 producer scenario and managed to pass data using BEA's custom transfer mechanism. Basically, from WLP portlet backing file you can add the object to the request something like:
The WLP consumer will serialize, encode this object (Base64) and add an extension to the SOAP message (getMarkup) with the result, something like:
As you mentioned, this value can be extracted from the SOAP message, Base64 decoded and deserialized on the JBoss Portal side using a custom JAX-RPC handler (for the MarkupService).
However, a downside of this approach is that, in case of sending custom objects, you need to have the same version of the class on the producer as well, otherwise the deserialization will fail. Therefore is safer to use primitives and common java objects.
Done, please review and amend it if case,
Why didn't you add it to the main content instead of as a comment? I can do the switch if needed, but you might as well get credits for it... :)
I will review the content later.
Thanks again and keep contributing to Portal! :)