Thursday, April 20, 2006

Mapping the Websphere Portlet Wiring Jungle

While great for inter portlet communication, IBM's concept of inter portlet comms by "wiring" using WSDL is a complicated one and easy to screw up. Here's some notes I've made as I've made my way through getting it working:

THE WSDL PARTS:
Types: Describes data types (using XML schema) that can be emitted by the source portlet.
Messages: Describes messages that can be produced or consumed by the portlet.
Port Type: Describes the abstract interface of the portlet, as seen by the property broker.
Binding: Describes how the abstract interface (port type) is implemented.

OUTPUT FROM A PORTLET:
Portlet HTTP Request Parameter Name (the wire action to call) ="XXXXX" ->
that portlets wsdl <binding... <operation... <portlet:action name="XXXXX"


Portlet HTTP Request Parameter Name (the value to pass) ="AAAAA" ->
that portlets wsdl <binding... <operation... <output... <portlet:param name="AAAAA"

that portlets wsdl <binding... <operation... <output... <portlet:param part-name="BBBBB" ->
that portlets wsdl <message... <part... name="BBBBB"

that portlets wsdl <binding... <operation... name="CCCCC" ->
that portlets wsdl <portType... <operation... name="CCCCC"

that portlets wsdl <binding type="tns:DDDDD" ->
that portlets wsdl <portType name="DDDDD"

that portlets wsdl <portType... <operation... <output message="tns:EEEEE" ->
that portlets wsdl <message... name="EEEEE"

that portlets wsdl <message... <part... type="tns:FFFFF" ->
that portlets wsdl <types... <xsd:schema... <xsd:simpleType name="FFFFF"

INPUT TO A PORTLET:
that portlets wsdl <types... <xsd:schema... <xsd:simpleType name="GGGGG" ->
that portlets wsdl <message... <part... type="tns:GGGGG"
NOTE: These datatypes must be the same as those in the output portlet wsdl

that portlets wsdl <message... name="HHHHH" ->
that portlets wsdl <portType... <operation... <input message="tns:HHHHH"

that portlets wsdl <portType name="IIIII" ->
that portlets wsdl <binding type="tns:IIIII" ->

that portlets wsdl <portType... <operation... name="JJJJJ" ->
that portlets wsdl <binding... <operation... name="JJJJJ"

that portlets wsdl <message... <part... name="KKKKK" ->
<binding... <operation... <input... <portlet:param part-name="KKKKK"

that portlets wsdl <binding... <operation... <input... <portlet:param name="LLLLL" ->
Portlet code request.getParameter("LLLLL"); // the passed value

that portlets wsdl <binding... <operation... <portlet:action name="MMMMM" ->
Portlet code request.getParameter("MMMMM"); // the called action


MORE INFORMATION:
See: http://www-128.ibm.com/developerworks/websphere/library/tutorials/0509_saddal/0509_saddal_reg.html

No comments: