Hi Pinaki,
What is the type of "shipTo" property? It needs to be a complex type. Can you
post your XSD? Thanks.
Fuhwei
Pinaki Poddar <[EMAIL PROTECTED]> wrote: Hello,
How does one specify a Property as containment property in XML Schema?
I was trying a simple example with a XML Schema (po.xsd) that had the
following snippet:
XSDHelper.INSTANCE.define(...) works fine to construct the types from
po.xsd.
However when the following is executed:
01: DataObject purchaseOrder =
DataFactory.INSTANCE.create("http://www.example.com/PO",
"PurchaseOrderType");
02: DataObject shipTo = purchaseOrder.createDataObject("shipTo");
It fails with
java.lang.IllegalArgumentException: The property 'shipTo' of
'PurchaseOrderType' isn't a containment
at
org.apache.tuscany.sdo.util.DataObjectUtil.createDataObject(DataObjectUt
il.java:421)
at
org.apache.tuscany.sdo.util.DataObjectUtil.createDataObject(DataObjectUt
il.java:467)
at
org.apache.tuscany.sdo.impl.DataObjectImpl.createDataObject(DataObjectIm
pl.java:1195)
at test.TestModel.testInstance(TestModel.java:41)
I am using tuscany-sdo-impl-1.0-incubating-beta1.jar.
Pinaki Poddar
972.834.2865
Notice: This email message, together with any attachments, may contain
information of BEA Systems, Inc., its subsidiaries and affiliated
entities, that may be confidential, proprietary, copyrighted and/or legally
privileged, and is intended solely for the use of the individual or entity
named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete
it.