Rich,
You are correct on the “propertyList”
element. It does not appear in the “getPortletPropertiesResponse”.
I was looking at the “setPortletProperties” at the time and
just made probably made the assumption that the structure was similar. Also
the namespace should be v2.
Aside from those inaccuracies though, I
just want to clear on the differences between v1 and v2. In v1, the
property name was just a simple string attribute value and now in v2 it is a
QName and the spec states:
“If this property's value is not
carried within the stringValue alternative of the Property structure, this name
also becomes the name of the XML element carrying the property's value with the
type field defining the type of this element.”
Would this not be quite different from the
example in v1 primer? Would not the XML for that same example look something
like (fixing the prior inaccuracies):
<urn:getPortletPropertiesResponse xmlns:urn="urn:oasis:names:tc:wsrp:v2:types"
xmlns:mn=”urn:mynamespace”>
<urn:properties name="mn:stockSymbolList">
<urn:stringValue>AMZN</urn:stringValue>
</urn:properties>
<urn:properties name="mn:refreshInterval">
<mn:refreshInterval>
<xs:int xmlns:xs="http://www.w3.org/2001/XMLSchema">180</xs:int>
</mn:refreshInterval>
</urn:properties>
</urn:getPortletPropertiesResponse>
Do I not have to look for an element with a
namespaced name of (urn:mynamespace, refreshInterval) to get the property
value?
Nader
Oteifa
From: Rich Thompson
[mailto:richt2@us.ibm.com]
Sent: Friday, February 08, 2008
7:22 AM
To: wsrp@lists.oasis-open.org
Subject: Re: [wsrp] Properties
The v2 example should not insert an element called
propertylist ... it is the type of the response and never actually appears as
an element. In fact, the only difference is the namespace changing to v2 ...
I
see the spec is silent, but, if I remember correctly, the intent was that a
property name appearing more than once would be treated the same way most app
servers treat a querystring parameter being repeated; namely, it becomes an
array. Anyone have a different recollection?
The
any is the schema equivalent for what most programming languages call
"Object" ... that is it can be anything. While the general case is
the array of objects, the special case of a single string is called out
separately as it is expected to be a common use case.
Rich
From:
|
"Nader Oteifa"
<nader2@netunitysoftware.com>
|
To:
|
<wsrp@lists.oasis-open.org>
|
Date:
|
02/07/08 03:49 PM
|
Subject:
|
[wsrp] Properties
|
Within a “PropertList” type, can the same named property
(multiple Properties element with same name attribute) appear more than once?
If yes, does that mean it is an array of values for the same property?
Within
a single “Property” type (Properties element in
setPortletProperties, etc.), the value can be either a single
“stringValue” or “Any”. What can
“Any” be: multiple elements identified by the property name QName
and defined by the property type? If multiple elements with same name
exist, are they multiple property values? And if so, why not have multiple
“stringValue” property values?
Given
the example of returning portlet properties in the 1.0 primer:
<urn:getPortletPropertiesResponse
xmlns:urn="urn:oasis:names:tc:wsrp:v1:types">
<urn:properties name="
stockSymbolList">
<urn:stringValue>AMZN</urn:stringValue>
</urn:properties>
<urn:properties
name="refreshInterval">
<xs:int xmlns:xs="http://www.w3.org/2001/XMLSchema">180</xs:int>
</urn:properties>
</urn:getPortletPropertiesResponse>
In
2.0, would this look like the following:
<urn:getPortletPropertiesResponse
xmlns:urn="urn:oasis:names:tc:wsrp:v1:types"
xmlns:mn=”urn:mynamespace”>
<urn:propertyList>
<urn:properties
name="mn:stockSymbolList">
<urn:stringValue>AMZN</urn:stringValue>
</urn:properties>
<urn:properties
name="mn:refreshInterval">
<mn:refreshInterval>
<xs:int xmlns:xs="http://www.w3.org/2001/XMLSchema">180</xs:int>
</mn:refreshInterval>
</urn:properties>
<urn:propertyList>
</urn:getPortletPropertiesResponse>
Is
this correct?
Nader Oteifa
NetUnity
Software