Bug 832447 - WSRP type factories require a lang value to create a Property even though it's optional according to XSD
WSRP type factories require a lang value to create a Property even though it'...
Status: VERIFIED
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal (Show other bugs)
5.2.1.GA
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Thomas Heute
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-15 08:26 EDT by Martin Weiler
Modified: 2013-09-02 01:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker GTNWSRP-294 Major Resolved WSRP type factories require a lang value to create a Property even though it's optional according to XSD 2013-04-03 04:10:39 EDT

  None (edit)
Description Martin Weiler 2012-06-15 08:26:52 EDT
Description of problem:
Issuing a request such as setPortletProperties, including a properties element without 'lang' attribute, is rejected on the server.

Example request:

<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
 <env:Header/>
 <env:Body>
  <v1:setPortletProperties xmlns:v1='urn:oasis:names:tc:wsrp:v1:types'>
   <v1:registrationContext xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:nil='true'/>
   <v1:portletContext>
    <v1:portletHandle>_efbab2d27f0000012637246a5e865a57</v1:portletHandle>
   </v1:portletContext>
   <v1:userContext>
    <v1:userContextKey>foo</v1:userContextKey>
   </v1:userContext>
   <v1:propertyList>
    <v1:properties name='GREETING'>
     <v1:stringValue>false</v1:stringValue>
    </v1:properties>
   </v1:propertyList>
  </v1:setPortletProperties>
 </env:Body>
</env:Envelope>

How reproducible:
Always
  
Actual results:
ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.IllegalArgumentException: Property requires a non-null, non-empty language
	at org.gatein.common.util.ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(ParameterValidation.java:116)
	at org.gatein.wsrp.WSRPTypeFactory.createProperty(WSRPTypeFactory.java:741)
	at org.gatein.wsrp.WSRPTypeFactory.createProperty(WSRPTypeFactory.java:735)
	at org.gatein.wsrp.spec.v1.V1ToV2Converter$V1ToV2Property.apply(V1ToV2Converter.java:1296)
	at org.gatein.wsrp.spec.v1.V1ToV2Converter$V1ToV2Property.apply(V1ToV2Converter.java:1290)
	at com.google.common.collect.Lists$TransformingRandomAccessList.get(Lists.java:448)
	at java.util.AbstractList$Itr.next(AbstractList.java:345)
	at java.util.AbstractCollection.toArray(AbstractCollection.java:124)
	at java.util.ArrayList.addAll(ArrayList.java:472)
	at org.gatein.wsrp.spec.v1.V1ToV2Converter.toV2PropertyList(V1ToV2Converter.java:684)
	at org.gatein.wsrp.endpoints.v1.PortletManagementEndpoint.setPortletProperties(PortletManagementEndpoint.java:174)

Expected results:
setPortletProperties method should get invoked successfully if optional lang parameter is missing in the request.
Comment 1 Michal Vanco 2012-06-19 06:31:38 EDT
See comment at https://bugzilla.redhat.com/show_bug.cgi?id=832887#c6

Note You need to log in before you can comment on or make changes to this bug.