[ http://issues.apache.org/jira/browse/TUSCANY-755?page=all ]
Frank Budinsky updated TUSCANY-755:
-----------------------------------
Assignee: Raymond Feng
Looking at this, I think the check on line 244 is wrong for the following
reasons:
1) getBaseTypes() doesn't include all base types, just the immediate ones. It
would need to recursively call getBaseTypes() if you wanted to check if it
really was one of the base types.
2) anyType is just an implicit base type, so it isn't in the list anyway.
3) The Tuscany implementation class that maps to anyType is
org.apache.tuscany.sdo.model.DataObject ... which isn't actually the right
DataObject (I think this is a separate issue, but we should clean it up.)
It looks to me that Fuhwei's suggestion of checking if type != modelType is the
right way to do this anyway.
Assigning to Raymond, because he wrote this code. Raymond, why did you add the
contains() check in the first place? Could you please take a look and confirm
that we're understanding this properly. Thanks.
> XMLStreamHelper.saveObject() does not serialize xsi:type correctly
> ------------------------------------------------------------------
>
> Key: TUSCANY-755
> URL: http://issues.apache.org/jira/browse/TUSCANY-755
> Project: Tuscany
> Issue Type: Bug
> Components: Java SDO Implementation
> Affects Versions: Java-M2
> Reporter: Fuhwei Lwo
> Assigned To: Raymond Feng
> Attachments: anytype.xsd, AnyTypeTest.java
>
>
> In XSD, I define an element of xsd:anyType. Then I create an instance of
> complexType called Person and set its value to the xsd:anyType element and
> serialize it using XMLStreamHelper.saveObject(). Then I use
> XMLStreamHelper.load() to transform the stream back to data object tree.
> What I get is an AnyTypeDataObjectImpl instead of DynamicDataObjectImpl
> representing the Person instance.
> This bug prevents the SCA users from using xsd:anyType for their services
> with SDO data bindings because the services won't be able to return correct
> SDO.
> I will attach a test case to demonstrate this problem.
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]