Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need Help in Implementing Inter Portlet Communication for Google Gadget

6 views
Skip to first unread message

asif.p...@accenture.com

unread,
Feb 11, 2008, 7:50:48 AM2/11/08
to
Hi,<br />
<br />
I have successfully set up IBM Portlet for Google Gadget in WPS 6.0 box. Now i am trying to implement Interportlet communication using the same.<br />
<br />
I referred this article <br />
<br />
http://www-128.ibm.com/developerworks/websphere/library/techarticles/0711_mishra/<br />
<br />
I selected a Google Map gadget from the list of Portlet Available and then i created a dummy source portlet which would pass parameters to the Google Map Gadget Portlet.<br />
<br />
I copied the wsdl into my source folder from the article and copied the code content into my process action but i when try to do wiring through the Administration page. I am not able to do so. It says no wires enabled. <br />
<br />
Any detailed Steps would be greatly appreciated. Thanks.

Jim Barnes

unread,
Feb 11, 2008, 10:11:07 AM2/11/08
to
WEll I looked into this and the issue has to do with the fact that the namespaces are different between the google portlet and the wsdl they give in the article<br />
<br />
Make your wsdl look like this in your source portlet<br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;definitions name="Source"<br />
targetNamespace="http://www.ibm.com/wps/c2a/googlegadgets"<br />
xmlns="http://schemas.xmlsoap.org/wsdl/"<br />
xmlns:portlet="http://www.ibm.com/wps/c2a"<br />
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"<br />
xmlns:tns="http://www.ibm.com/wps/c2a/googlegadgets"<br />
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br />
xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;<br />
&lt;types&gt;<br />
&lt;xsd:schema<br />
targetNamespace="http://www.ibm.com/wps/c2a/googlegadgets"&gt;<br />
&lt;xsd:complexType name="GADGET_PARAMS"&gt;<br />
&lt;xsd:all&gt;<br />
&lt;xsd:element name="part1" type="xsd:string"/&gt;<br />
&lt;xsd:element name="part2" type="xsd:string"/&gt;<br />
&lt;xsd:element name="part3" type="xsd:string"/&gt;<br />
&lt;/xsd:all&gt;<br />
&lt;/xsd:complexType&gt;<br />
&lt;/xsd:schema&gt;<br />
&lt;/types&gt;<br />
&lt;message name="SetGadgetParamRequest"&gt;<br />
&lt;part name="GADGET_PARAMS" type="tns:GADGET_PARAMS" /&gt;<br />
&lt;/message&gt;<br />
&lt;portType name="Source"&gt;<br />
&lt;operation name="set_GadgetParams"&gt;<br />
&lt;output message="tns:SetGadgetParamRequest" /&gt;<br />
&lt;/operation&gt;<br />
&lt;/portType&gt;<br />
&lt;binding name="GadgetsBinding" type="tns:Source"&gt;<br />
&lt;portlet:binding /&gt;<br />
&lt;operation name="set_GadgetParams"&gt;<br />
&lt;portlet:action name="setGadgetParams" type="standard"<br />
caption="show.gadget.with.this.params"<br />
description="show.gadget.with.this.params"<br />
actionNameParameter="ACTION_NAME" /&gt;<br />
&lt;output&gt;<br />
&lt;portlet:param name="GADGET_PARAMS"<br />
class="java.util.HashMap" partname="GADGET_PARAMS"<br />
boundTo="request-attribute" caption="gadget.params" /&gt;<br />
&lt;/output&gt;<br />
&lt;/operation&gt;<br />
&lt;/binding&gt;<br />
&lt;/definitions&gt;<br />
<br />
<br>
IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0<br>
IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0<br>
<br>
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

Jim Barnes

unread,
Feb 11, 2008, 10:35:59 AM2/11/08
to
This is what your wsdl file will need to look like<br />

&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;definitions name="Source"<br />
targetNamespace="http://www.ibm.com/wps/c2a/googlegadgets"<br />
xmlns="http://schemas.xmlsoap.org/wsdl/"<br />
xmlns:portlet="http://www.ibm.com/wps/c2a"<br />
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"<br />
xmlns:tns="http://www.ibm.com/wps/c2a/googlegadgets"<br />
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br />
xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;<br />
&lt;types&gt;<br />
&lt;xsd:schema<br />
targetNamespace="http://www.ibm.com/wps/c2a/googlegadgets"&gt;<br />
&lt;xsd:complexType name="GADGET_PREFS"&gt;<br />

&lt;xsd:all&gt;<br />
&lt;xsd:element name="part1" type="xsd:string"/&gt;<br />
&lt;xsd:element name="part2" type="xsd:string"/&gt;<br />
&lt;xsd:element name="part3" type="xsd:string"/&gt;<br />
&lt;/xsd:all&gt;<br />
&lt;/xsd:complexType&gt;<br />
&lt;/xsd:schema&gt;<br />
&lt;/types&gt;<br />
&lt;message name="SetGadgetParamRequest"&gt;<br />
&lt;part name="GADGET_PARAMS" type="tns:GADGET_PREFS" /&gt;<br />

asif.p...@accenture.com

unread,
Feb 13, 2008, 1:11:32 AM2/13/08
to
Hi Jim,<br />
<br />
I copied the WSDL you provided into my source portlet. Although Now i was able to wire it. But somehow it is still not working. I would appreciate if you could provide me the working code in zip format for this interportlet communication.<br />
<br />
Also when i search for IBM Google Map gadget. My Google Map search gadget looks like this. This is different from the snapshot provided in the article.<br />
<br />
Attached is the snapshot and the source code for the source portlet.<br />
<br />
Anyhelp on this is greatly appreciated.

Jim Barnes

unread,
Feb 13, 2008, 6:57:36 AM2/13/08
to
yes I talked with development and they gave me this response<br />
<br />
For using IPC feature of google gadgets portlet with a map gadget,we can use map gadget which I used for article. Since It is not shown in gadget selection page(might be because of Google's ranking stuff), we will have to configure it using admin console. Please follow the steps below :<br />
<br />
1. Go to admin console --&gt; Portlet Management --&gt; Portlets and search for "IBM Portlet for Google Gadgets"<br />
2. Click on Configure Portlet icon.<br />
3. Using the Add button, add following name-value pairs<br />
KEY VALUE<br />
setting_name_0 up_view<br />
setting_value_0 Map<br />
setting_name_1 up_zoom<br />
setting_value_1 Street<br />
setting_name_2 up_loc<br />
setting_value_2 1600 Amphitheatre Parkway, Mountain View, CA<br />
setting_name_3 up_locname<br />
setting_value_3 Google<br />
gadget.height 200<br />
gadget.num.userprefs 4<br />
gadget.url http://ralph.feedback.googlepages.com/googlemap.xml<br />
NOTE : If you have already selected any gadget in configure mode, just override the corresponding key values by clicking on "Edit Parameter" icon.<br />
<br />
4. Press OK button.<br />
<br />
We have configured the map gadget ;-). Put "IBM Portlet for Google Gadgets" Portlet on a page. It would show you portlet with map gadget. You can wire this portlet instance with your source portlet.<br />
<br />
5. In gadget_param_mapping.xml file, you must pay attention to "mapper" attribute. If this attribute is defined, you must have that class in classpath as mentioned in the article. For your demo purposes, you may skip this like mapper=""<br />
<p />

asif.p...@accenture.com

unread,
Feb 18, 2008, 1:42:05 AM2/18/08
to
Hi,<br />
<br />
I implemented the changes which you suggested. Though i am now able to see the 4 parameters in the configure mode of the IBM google Map Portlet.<br />
<br />
I am still not able to implement the IPC for the same.<br />
<br />
I have done the following things.<br />
<br />
1) Implemented the changes you suggested for Google Map Portlet.<br />
2) Created a Dummy Source Portlet.<br />
3) Made the Dummy Source Portlet as Source and copied the WSDL you had provided.<br />
4) Created a jar file for MyLocationMapper and kept it in the shared/app directory of the portal server.<br />
5) Created the wires between the source and the target IBM portlet.<br />
<br />
I would be really glad if you provide me the ready code for the source portlet.

Jim Barnes

unread,
Feb 18, 2008, 6:28:06 AM2/18/08
to
I have not actually gone past the directions that I got from development, but here is the source portlet I had created, I do not know if it works or not<br />
Jim<br />
<br />

Jim Barnes

unread,
Feb 18, 2008, 12:16:49 PM2/18/08
to
I tested this version this morning and it works<br />

asif.p...@accenture.com

unread,
Feb 19, 2008, 5:28:42 AM2/19/08
to
Thanks it is working now :)

gokulakrishna...@ey.com

unread,
Jul 11, 2008, 11:59:26 AM7/11/08
to
I'm getting proxy Authentication failure Error, I modified proxy.properties according to my env.

please attached the file,

Can anyone help, Thanks in advance,

Jim Barnes

unread,
Jul 11, 2008, 1:55:40 PM7/11/08
to
any errors in the logs? does the proxy require authentication? did you create the credential slot correctly if it does?

IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0

The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

gokulakrishna...@ey.com

unread,
Jul 11, 2008, 2:23:42 PM7/11/08
to
yes, I require Authentication,

the below log file,

Exception occured while Inter Portlet Communication

com.ibm.wps.portlets.gadget.ipc.impl.MappingException: Mapper must be defined when there are multiple source keys for a gadget parametere

Do I need to create Credential slot?

gokulakrishna...@ey.com

unread,
Jul 11, 2008, 2:41:52 PM7/11/08
to
Thanks, Jim

But I did with proxy settings,I got the below error even after I copied the googlegadgetintegrated.jar and mapperIfc.jar under /sharted/app

Am I missing something?

*Exception occured while Inter Portlet Communication

com.ibm.wps.portlets.gadget.ipc.impl.MappingException: Mapper class can not be instantiated*

at com.ibm.wps.portlets.gadget.ipc.impl.GadgetParameters.getMappedParamValue(GadgetParameters.java:228)

at com.ibm.wps.portlets.gadget.ipc.impl.GadgetParameters.doMapping(GadgetParameters.java:173)

at com.ibm.wps.portlets.gadget.ipc.impl.GadgetParameters.getGadgetParamValues(GadgetParameters.java:67)

at com.ibm.wps.portlets.gadget.IntegratedGadgetPortlet.saveGadgetPrefs_Emitted_From_SourcePortlet(IntegratedGadgetPortlet.java:581)

at com.ibm.wps.portlets.gadget.IntegratedGadgetPortlet.processAction(IntegratedGadgetPortlet.java:441)

at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.processAction(PortletFilterChainImpl.java:104)

at com.ibm.wps.propertybroker.standard.filter.PropertyBrokerActionFilter.processAction(PropertyBrokerActionFilter.java:261)

at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.processAction(PortletFilterChainImpl.java:95)

at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.dispatch(PortletServlet.java:148)

at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.doGet(PortletServlet.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)

at com.ibm.wps.pe.pc.std.cache.CacheablePortlet.service(CacheablePortlet.java:393)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:673)

at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:613)

at com.ibm.wps.pe.om.definition.impl.ServletDefinitionImpl$RDWrapper.include(ServletDefinitionImpl.java:406)

at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:204)

at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:168)

at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.action(PortletInvokerImpl.java:82)

at com.ibm.wps.pe.pc.std.event.ActionEvent.execute(ActionEvent.java:114)

at com.ibm.wps.pe.pc.std.event.EventQueueManager.processEventLoop(EventQueueManager.java:86)

at com.ibm.wps.pe.pc.std.PortletContainerImpl.performEvents(PortletContainerImpl.java:168)

at com.ibm.wps.pe.pc.PortletContainerImpl.performEvents(PortletContainerImpl.java:243)

at com.ibm.wps.engine.phases.WPActionPhase.processPortlets(WPActionPhase.java:889)

at com.ibm.wps.engine.phases.WPActionPhase.execute(WPActionPhase.java:487)

at com.ibm.wps.state.phases.AbstractActionPhase.next(AbstractActionPhase.java:130)

at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:788)

at com.ibm.wps.engine.Servlet.doGet(Servlet.java:629)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1239)

at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:136)

at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:86)

at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)

at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)

at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:257)

at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:142)

at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:121)

at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)

at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:670)

at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2965)

at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)

at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)

at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1931)

at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)

at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)

at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:101)

at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)

at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)

at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)

at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)

at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1470)

Caused by: java.lang.InstantiationException: com.ibm.wps.portlets.gadget.ipc.GadgetValueMapper

at java.lang.Class.newInstance3(Class.java(Compiled Code))

at java.lang.Class.newInstance(Class.java(Compiled Code))

at com.ibm.wps.portlets.gadget.ipc.impl.GadgetParameters.getMapperInstance(GadgetParameters.java:194)

at com.ibm.wps.portlets.gadget.ipc.impl.GadgetParameters.getMappedParamValue(GadgetParameters.java:215)

... 54 more

Jim Barnes

unread,
Jul 11, 2008, 2:27:14 PM7/11/08
to
yes if you look here

http://www-128.ibm.com/developerworks/websphere/zones/portal/catalog/doc/1wp1001aj/index.html

if you look under the section for the proxy config

http.proxyEnabled Set to true if the portal server is in a proxied environment, otherwise, false.

http.proxyHost The host name of the HTTP Proxy Server

http.proxyPort The relevant port number of the HTTP Proxy Server

http.proxyCredentialSlotName Name of the Credential Slot that contains the authentication details for the HTTP Proxy Server. The credential slot must be of the type UserPasswordPassive.

so you need that credential slot to already exist, and you just put its name in here

Jim

Jim Barnes

unread,
Jul 11, 2008, 2:47:48 PM7/11/08
to
did you restart after copying them there?

Jim Barnes

unread,
Jul 11, 2008, 2:48:58 PM7/11/08
to
also did you create the credential slot?

gokulakrishna...@ey.com

unread,
Jul 11, 2008, 2:59:30 PM7/11/08
to
yes, I did restart.

gokulakrishna...@ey.com

unread,
Jul 14, 2008, 11:11:16 AM7/14/08
to
I did the below set-up in Websphere Portal, but still the IPC is not working,

( http://www-1.ibm.com/support/docview.wss?rs=688&#38;ca=portall2&#38;uid=swg21296009 ) Wiring is not working for the Google Gadgets

I have a proxy, Also I created a slot by name "UserPasswordPassive" updated in proxy.properties.

am i missing something? Any help is appreciated.

Jim Barnes

unread,
Jul 14, 2008, 11:57:39 AM7/14/08
to
well can you see any gadget at all? if not then the wiring will not work, are you getting the same error?

Jim Barnes

unread,
Jul 14, 2008, 12:08:20 PM7/14/08
to
ok you set up the google map gadget by hand then, did you try the sample portlet above?

gokulakrishna...@ey.com

unread,
Jul 14, 2008, 12:06:05 PM7/14/08
to
now the proxy error is resolved,When I select any gadget I can see gadget, but I was trying to use "google map", to establish the communication by GoogleSender portlet.

gokulakrishna...@ey.com

unread,
Jul 14, 2008, 12:39:23 PM7/14/08
to
I'm little confused, I did the steps that the technote instructed.Thanks,

gokulakrishna...@ey.com

unread,
Jul 14, 2008, 12:21:07 PM7/14/08
to
you mean "GoogleSender"?

gokulakrishna...@ey.com

unread,
Jul 14, 2008, 12:22:43 PM7/14/08
to
yes I did,

gokulakrishna...@ey.com

unread,
Jul 14, 2008, 12:30:09 PM7/14/08
to
I did a "search Gadget", then I selected map gadget, Thanks.

Jim Barnes

unread,
Jul 14, 2008, 12:25:01 PM7/14/08
to
when you set up the gadget by hand does it show the map gadget?

Jim Barnes

unread,
Jul 14, 2008, 12:31:28 PM7/14/08
to
to get the sample to work you cannot do that, you HAVE to define the gadget by had as documented in the technote

Jim Barnes

unread,
Jul 14, 2008, 12:22:00 PM7/14/08
to
yes

Jim Barnes

unread,
Jul 14, 2008, 12:59:16 PM7/14/08
to
well if you did search gadget and then selected a gadget it will overwrite the steps you did in 1-4 of the technote,

so you will need to do them again

gokulakrishna...@ey.com

unread,
Jul 14, 2008, 1:12:23 PM7/14/08
to
Do I need to set the following additional parameters in Config Mode,

allowed.change_gadgetprefs

allowed.gadgetselection

com.ibm.portal.propertybroker.wsdllocation

The above parameters are not in technote,

Jim Barnes

unread,
Jul 14, 2008, 1:26:47 PM7/14/08
to
those ones should already be set, the technote only defines the ones you need to add or override
0 new messages