You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <tu...@ws.apache.org> on 2006/06/16 00:17:31 UTC

[jira] Updated: (TUSCANY-470) DataObject.getXXX("propertyName") doesn't work for property from open content

     [ http://issues.apache.org/jira/browse/TUSCANY-470?page=all ]

Raymond Feng updated TUSCANY-470:
---------------------------------

    Summary: DataObject.getXXX("propertyName") doesn't work for property from open content  (was: DataObject.getXXX("aaa.bbb") throws NumerFormatException even if "aaa.bbb" is the XSD element name)

I'm changing the description to reflect the real problem. The previous one was misleading.

<element name="aaa" type="ns:XXX"/> 

<element name="aaabbb" type="ns:XXXYYY" substitutionGroup="ns:aaa"/> 

In my case, the property "aaabbb" is from the substitution group, so it only shows up in the DataObject.getInstanceProperties() list but not dataObject.getType().getProperties(). The current Tuscany code doesn't check if the type is open and the property is in getInstanceProperties() list. 
As a result the call against dataObject.getXXX("aaabbb") returns null, which is wrong.



> DataObject.getXXX("propertyName") doesn't work for property from open content
> -----------------------------------------------------------------------------
>
>          Key: TUSCANY-470
>          URL: http://issues.apache.org/jira/browse/TUSCANY-470
>      Project: Tuscany
>         Type: Bug

>   Components: Java SDO Implementation
>     Versions: Java-M1
>     Reporter: Raymond Feng
>     Assignee: Frank Budinsky

>
> In my XSD, I have an element named as "aaa.bbb" which is contained by a complexType foo.
> <complexType name="foo">
>     <element name="aaa.bbb" type="xsd:string"/>
> <complexType>
> Now I have an instance of foo as a DataOject and when I try to retrieve the property using the following code:
> String value = fooDataObject.getString("aaa.bbb");
> I'll get a NumerFormatException. Obviously, the SDO runtime is confused and treats "aaa.bbb" as a XPath expression. 
> I'm not sure what the SDO spec says. Maybe we should do some checking or require such property name to be escaped like "aaa\.bbb"?
> Thanks,
> Raymond

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org