Hi Pinaki,
I think your XSDHelper.define() failed to register types for some reason. Can
you try this to see whether any types were registered?
java.util.List types = XSDHelper.INSTANCE.define(fis, null);
for (int i=0; i<types.size(); i++) {
System.out.println("Type defined: " + types.get(i));
}
Normally, you should see PurchaseOrderType, USAddress, etc registered.
Fuhwei
Pinaki Poddar <[EMAIL PROTECTED]> wrote: Hello Fuhwei,
I am following your footstep! It is the same po.xsd I copied from your
very readable post
http://www.ibm.com/developerworks/webservices/library/ws-sdoxmlschema/in
dex.html
except that it was missing a closing
Thanks for your help.
Pinaki Poddar
972.834.2865
-----Original Message-----
From: Fuhwei Lwo [mailto:[EMAIL PROTECTED]
Sent: Monday, July 02, 2007 3:35 PM
To: [email protected]
Subject: Re: How does one specify a Property as containment property in
XML Schema?
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
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.
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]