

If JAXB deserialization fails, an object of type .holders.XmlPayload is created to hold the raw XML representation of the event payload. Otherwise, JAXB deserialization is attempted on the XML representation of the event's payload. Note that this requires the appropriate Java class that is being deserialized to be in the class path. Otherwise, if the event's payload in the SOAP message is encoded in the WLP-specific serialized Java object schema, the object is deserialized. If the event's payload in the SOAP message is encoded in a WSRP 2.0 NamedStringArray schema type, it is converted into a .holders.NamedStringArray object. This scenario occurs, for example, when an event is sent by a producer portlet and delivered to a portlet on the consumer, or when an event is received by a portlet on a WLP producer. When converting an event payload from a WSRP SOAP message to a Java object, WebLogic Portal uses the following logic. Otherwise, the event's payload is serialized using Java serialization, base-64 encoded, and put in a WLP-specific XML event schema type.ħ.5.3 How WLP Converts an Event Payload to a Java Object Otherwise, if the event's payload is a Java object with a Java Architecture for XML Binding (JAXB) binding, JAXB serialization will be used to encode the payload as XML. Otherwise, if the event's payload is an instance of .holders.XmlPayload, the event payload is encoded as the XML represented by the object. If the event's payload is an instance of the .holders.NamedStringArray class, the event payload is encoded in a WSRP 2.0 NamedStringArray schema type. This scenario occurs, for example, when an event is sent by a portlet on the consumer and needs to be delivered to a portlet on a producer, or when a portlet on a WLP producer sends an event. When packaging an event payload into a WSRP SOAP message, WebLogic Portal uses the following logic to convert the event payload to XML. Two special Java objects are used for WSRP event payloads in these cases:Ĭom.NamedStringArray – This class represents the optional NamedStringArray schema type defined in the WSRP 2.0 specification for event payloads, and represents an ordered list of name/value pairs of simple strings.Ĭom.XmlPayload – This class represents arbitrary XML for an event's payload.ħ.5.2 How WLP Packages Event Payloads in XML Format When event payload conversion into or from a WSRP SOAP message is necessary, WebLogic Portal follows the guidelines discussed in this section.

This allows a Oracle WebLogic Portal consumer to distribute events between portlets on third-party producers even though the consumer cannot understand the event payload. For this reason, Oracle WebLogic Portal avoids converting event payloads to Java objects whenever possible.
Jrebel remote portlet how to#
It is therefore possible that an event could be received from a portlet on a third-party WSRP producer, and that WebLogic Portal would not know how to convert the event's payload to a Java object. The consumer is responsible for receiving events and distributing them to the appropriate portlets.When events are sent over WSRP, the event payload object must be sent in XML form to be WSRP-compliant, but the WSRP 2.0 specification does not dictate a particular scheme for encoding event payloads to ensure interoperability. In the Package Explorer, double-click the Java portlet file to open the portlet in the editor, as shown in Figure 7-26.Įvents can be sent from any portlet on the consumer or producer to any other portlet on the consumer or to any producer. In Oracle Enterprise Pack for Eclipse, create a Java portlet using the class shown in Example 7-4. To configure the event handler in the producer portlet: Note that in this case the custom event is fired by a portlet deployed to the consumer application. In the following steps, you will configure the portlet.xml file to mark the portlet as processing this event. The getMessage() method receives the event object containing the payload sent from the consumer to the producer. Response.getWriter().write("Message From Consumer: " + String message = request.getParameter("message0")

Public void doView(RenderRequest request, RenderResponse response) String message = (String)event.getValue() Public class JavaPortlet extends void getMessage(EventRequest request, EventResponse response)
