Topic
  • 2 replies
  • Latest Post - ‏2013-03-12T13:25:04Z by K@nika
K@nika
K@nika
7 Posts

Pinned topic Passing XML between inter portlet communication - WEF 8

‏2013-03-11T06:05:37Z |
IPC and passing XML betwen portlets. The steps are as listed :

Create WEF project. Add cooperative source portlet, portlet adapter and a page builder containing search criteria to a model. Create another model,add cooperative target portlet, event handler, portlet adapter and a page builder containing search results. Use Property Broker Action.Specify anyType as Output/Input Type in cooperative portlet builders. And pass XML which will have the values. On Portal, add wiring between search and search results portlet and select this AnyType variable.
Observation : Exception when clicking search button on source page.

7/3/13 16:42:36:841 IST 000003ad PropertyDispa E com.ibm.wps.propertybroker.dispatch.PropertyDispatcherImpl dispatchSourceEvents EJPKB1002E: The propertybroker encountered an error while dispatching the source event {http://www.ibm.com/leadSearch}searchStr from portlet window Control@132740052 (searchLeads, [ObjectIDImpl 'Z7_4QKC12C0J8FQD0INCLSOQ320T0', NAVIGATION_NODE, VP: 0, Domain: rel], DB: 0000-4453160403133DDD80BCAC72AC87001D, [ObjectIDImpl 'Z6_4QKC12C0J8FQD0INCLSOQ320H1', CONTENT_NODE, VP: 0, Domain: rel], DB: 0000-4453160403133DDD80BCAC72AC870031, 100 with value <SearchLeads><LeadID>11003</LeadID>
<LeadName>Category1</LeadName>
<LeadStatus>Captured</LeadStatus>
</SearchLeads> com.ibm.portal.propertybroker.exceptions.CommunicationTargetDispatchException: EJPKB1001E: An Error occurred while dispatching to the communication target com.ibm.wps.portletmodel.ProcessingEventDefinitionImpl for window com.ibm.wps.composition.elements.Control.
at com.ibm.wps.propertybroker.standard.filter.JsrEventActionDispatcherPluginImpl.buildTargetJsrEventInformation(JsrEventActionDispatcherPluginImpl.java:265)
Caused by: javax.xml.bind.MarshalException
- with linked exception:
[com.ibm.jtc.jax.istack.SAXException2: A cycle is detected in the object graph. This will cause infinitely deep XML: <SearchLeads><LeadID>11003</LeadID>
<LeadName>Category1</LeadName>
<LeadStatus>Captured</LeadStatus>
</SearchLeads>
-> <SearchLeads><LeadID>11003</LeadID>
<LeadName>Category1</LeadName>
<LeadStatus>Captured</LeadStatus>
</SearchLeads>
]

Modify output/input type from anyType to XML. Same exception observed.
Modify output/input type from anyType to java.util.ArrayList. NullPointer Exception encountered.

Instead of passing String/Integer (basic datatypes) is it possible to pass XML between portlets ?
Updated on 2013-03-12T13:25:04Z at 2013-03-12T13:25:04Z by K@nika
  • mburati
    mburati
    2590 Posts

    Re: Passing XML between inter portlet communication - WEF 8

    ‏2013-03-11T13:59:18Z  
    That error appears to be from the portal event framework trying to marshal/unmarshal the XML.

    It would likely be more efficient to share the XML between the portlets with the WEF Shared Variable builder and then send an index (eg, the id element text value of the element you need to pass) between them in the event rather than trying to send all of the XML as a parameter of the event.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
  • K@nika
    K@nika
    7 Posts

    Re: Passing XML between inter portlet communication - WEF 8

    ‏2013-03-12T13:25:04Z  
    • mburati
    • ‏2013-03-11T13:59:18Z
    That error appears to be from the portal event framework trying to marshal/unmarshal the XML.

    It would likely be more efficient to share the XML between the portlets with the WEF Shared Variable builder and then send an index (eg, the id element text value of the element you need to pass) between them in the event rather than trying to send all of the XML as a parameter of the event.

    I hope that info helps,
    ..Mike Burati
    http://www-10.lotus.com/ldd/pfwiki.nsf/
    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.
    Thanks for the response Mike !
    We have tried selecting "xsd:anyType" for sending XML ad it worked. Surprisingly selecting anyType from drop down did not work but typing xsd:anyType did work.