Christian,
 yes,  you need to use the DataFactory instance that is contained in the
HelperContext.  this is the idea of a Helpercontext,  it is a collection of
helper instances all sharing a type scope.  So instead of
DataFactory.INSTANCE you need to use hc.getDataFactory().  Only this
instance will have access to the types you defined with the XSDHelper that
belongs to the hc instance of HelperContext.

regards, Kelvin.

On 26/03/07, Christian Landbo Frederiksen <
[EMAIL PROTECTED]> wrote:


In M2 & M3 this works for a specific schema:

XSDHelper.INSTANCE.define(new String(xsdFile.getBytes("UTF-8")));
DataObject documentDataObject = DataFactory.INSTANCE.create(namespace,
                                        "DocumentRoot");

But this doesn't

HelperContext hc = SDOUtil.createHelperContext(true);
hc.getXSDHelper().define(new String(xsdFile.getBytes("UTF-8")));

DataObject documentDataObject = DataFactory.INSTANCE.create(namespace,
                                        "DocumentRoot");


java.lang.IllegalArgumentException
        at
org.apache.tuscany.sdo.helper.DataFactoryImpl.create(DataFactoryImpl.jav
a:63)
        at
org.apache.tuscany.sdo.helper.DataFactoryImpl.create(DataFactoryImpl.jav
a:46)
        at
sandbox.TestTypeChangesAndExtensibleNamespaces.generate(TestTypeChangesA
ndExtensibleNamespaces.java:153)
        at
sandbox.TestTypeChangesAndExtensibleNamespaces.main(TestTypeChangesAndEx
tensibleNamespaces.java:77)


Any ideas?

-----Original Message-----
From: Frank Budinsky [mailto:[EMAIL PROTECTED]
Sent: 22. marts 2007 13:38
To: [email protected]
Subject: RE: SDO Java M3 Release Candidate RC1

Sorry, there's not much documentation, just the JavaDoc. You need to get
a
HelperContext by calling SDOUtil.createHelperContext() and then get your

XSDHelper from it.

If you want the new extensible namespaces behavior you need to pass
"true"
to createHelperContext:

HelperContext hc = SDOUtil.createHelperContext(true);

Frank.




"Christian Landbo Frederiksen" <[EMAIL PROTECTED]>

03/22/2007 06:30 AM
Please respond to
[email protected]


To
<[email protected]>
cc

Subject
RE: SDO Java M3 Release Candidate RC1






The testcase I used the last time does not function using SDO M3, but I
guess It is because I can't just use XSDHelper.INSTANCE. I remember
Frank
mentioning something about helpercontexts. Have you got any
documentation
as to hov this is done.

/Chr

ps. the test case is the one from:
https://issues.apache.org/jira/browse/TUSCANY-1113?page=com.atlassian.ji
ra.plugin.system.issuetabpanels:comment-tabpanel#action_12473251
<
https://webmail.topnordic.com/exchweb/bin/redir.asp?URL=https://issues.a
pache.org/jira/browse/TUSCANY-1113?page=com.atlassian.jira.plugin.system
.issuetabpanels:comment-tabpanel%23action_12473251
>



________________________________

From: kelvin goodson [mailto:[EMAIL PROTECTED]
Sent: Fri 3/16/2007 9:14 AM
To: [email protected]
Subject: Re: SDO Java M3 Release Candidate RC1



Christian,
  The required jars for EMF 2.2.2 and the SDO 2.1 API are packaged in
the
binary release.
Regards, Kelvin.

On 15/03/07, Christian Landbo Frederiksen <
[EMAIL PROTECTED]> wrote:
>
>
> What version of EMF and SDO api is needed for this release?
>
> -----Original Message-----
> From: kelvin goodson [mailto:[EMAIL PROTECTED]
> Sent: 15. marts 2007 16:42
> To: tuscany-dev; Tuscany Users
> Subject: SDO Java M3 Release Candidate RC1
>
> I have posted an SDO Java M3 release candidate here:
>
http://people.apache.org/~kelvingoodson/sdo_java/M3/RC1/<http://people.a
> pache.org/%7Erobbinspg/M3-RC1/>
>
> Please take a look at this and try it out, so that I can pick up any
> errors
> quickly and move towards a vote on a proper release in the short term.
>
> Thanks, Kelvin.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to