OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

wsrp-interop message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [wsrp-interop] WSRP event payloads with "simple" types


Any of these links of help?



I think dealing with an extension is probably more complex than trying to
figure out how to make it work with primitive types without having to create
a class. Do you expand payload to include all primitive types?  What about
arrays of primitive types? I don't even think namedStringArray should be in
payload and even in the specification it appeared like it originally was not

I think you'll have to take the "Any" XML element use it as input to a new
Unmarshaller but only when the value of the payload is requested with the
given type.  When marshalling, you'll need to have an extra parameter to
specify that a root should be created with same name as event or use
overloaded methods.  Example:

int x = myEvent.GetValue<int>(0); //parameter is default value for type 
myEvent.SetValue<int>(x, true); // parameter = true to create an element
with same name as event name


int x = myEvent.GetValue(0); //overloaded methods for all primitive types
myEvent.SetValue(x); //these create the element with same name as event

or some variation on this theme.


-----Original Message-----
From: Kevin Frender [mailto:kevin.frender@oracle.com] 
Sent: Wednesday, October 14, 2009 3:58 PM
To: wsrp-interop@lists.oasis-open.org
Subject: [wsrp-interop] WSRP event payloads with "simple" types

Hello all,

For WSRP 2.0 events, the schema-supported event payload types are a 
NamedStringArray and "any" from a non-WSRP-types namespace.  This was a 
conscious decision at the time to not get into the details of 
standardizing event payload encoding.

For JSR286 (Java Portlet specification version 2.0) event payloads can 
have any JAXB-bindable object type, or any of the JAXB primitive types, 
which include very basic things like java.lang.String, java.util.Date, 
etc. which have obvious mappings to XML data types.  The JAXB primitive 
types don't have @XmlRootElement annotations however, so they can't be 
marshalled directly (by themselves) to XML.

So if a portlet wanted to send an event with a simple String payload, 
JSR286 allows that, but there is no obvious way to represent that in XML 
as a WSRP event payload in a manner that other WSRP containers could 

In the interest of interoperability, I was wondering how everyone 
handles the binding of these "primitive" types when they are used as an 
event payload.  We were thinking of creating a simple XML element for 
holding these types inside the event payload, but that wouldn't work too 
well for WSRP interoperability, unless the WSRP committee came up with a 
standard schema and XML namespace to hold these "simple" types.  So as a 
second question, I was wondering if there was interest in creating a 
standard WSRP extension for handling these simple data types.



To unsubscribe from this mail list, you must leave the OASIS TC that
generates this mail.  Follow this link to all your TCs in OASIS at:

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]