The SDO spec says that xsd:double maps to the SDO type 
"commonj.sdo#Double" so you get it using typeHelper.getType("commonj.sdo", 
"Double").

Frank.

"Christian Landbo Frederiksen" <[EMAIL PROTECTED]> wrote on 04/03/2007 
04:46:13 PM:

> 
> Ok great, but what if schema is as simple as this:
> 
>  <?xml version="1.0" encoding="utf-8"?>
>  <schema xmlns:test="testns" xmlns="http://www.w3.org/2001/XMLSchema";
>  targetNamespace="testns">
>    <element name="Test" type="double"/>
>  </schema>
> 
> /Chr
> 
> 
> -----Original Message-----
> 
> The type needed as param for SDAOUtil.createDataTypeWrapper() is the 
> simple type you want to set ("testns#TestType" in your example below).
> You 
> can get it using typeHelper.getType("testns", "TestType").
> 
> SDOUtil.createDataTypeWrapper() will create a DataObject that wraps the 
> requested data type value. SimpleAnyTypeDataObjectImpl is the Tuscany 
> implementation class of the wrapper object.
> 
> Frank.
> 
> -----Original Message-----
> From: Christian Landbo Frederiksen 
> Sent: 3. april 2007 14:43
> To: '[email protected]'
> Subject: RE: Root property that is not containment
> 
> Hi
> 
> I know this thread is OLD, but I have been forced to look at this again
> (I thought I could ignore simple typed roots).
> 
> I hope some of you can remember when you read it again :)
> 
> My question is: how do you create the type needed as param for the
> SDOUtil.createDataTypeWrapper() method. I have seen the getXSDSDOType
> method but how do I find out what the simple type is, that is defined.
> 
> I tried to do a load and it just resulted in a
> SimpleAnyTypeDataObjectImpl.
> 
> Have you got any axamples using SDOUtil.createDataTypeWrapper()?
> 
> /Chr
> 
> -----Original Message-----
> From: Frank Budinsky [mailto:[EMAIL PROTECTED] 
> Sent: 30. januar 2007 02:12
> To: [email protected]
> Subject: Re: Root property that is not containment
> 
> Hi Cristian,
> 
> To create a document with a root element that is a simple type (DataType
> 
> as opposed to DataObject) you need a wrapper DataObject. You can call 
> SDOUtil.createDataTypeWrapper() to get one.
> 
> Frank.
> 
> "Christian Landbo Frederiksen" <[EMAIL PROTECTED]>
> 
> wrote on 01/29/2007 05:27:08 PM:
> 
> > Hi
> > 
> > I have just started using this SDO-thing and I am very excited about
> it.
> > I am using it to analyse xml-schemas and to generate and accept data
> for
> > the given schemas.
> > 
> > I have run into something (again). Lets say I am given a simple schema
> > such as this: 
> > 
> > <?xml version="1.0" encoding="utf-8"?>
> > <schema xmlns:test="testns" xmlns="http://www.w3.org/2001/XMLSchema";
> > targetNamespace="testns">
> >   <element name="Test" type="test:TestType"/>
> >   <simpleType name="TestType">
> >     <restriction base="decimal">
> >       <minInclusive value="0"/>
> >       <maxInclusive value="13"/>
> >     </restriction>
> >   </simpleType>
> > </schema>
> > 
> > When analysing this I cannot generate a DataObject for the
> Test-property
> > because it is not a containment property.
> > So I figured I could just use the 'DocumentRoot' DataObject, but this
> > gives me XML like this, which is not valid:
> > 
> > <?xml version="1.0" encoding="ASCII"?>
> > <_20:DocumentRoot
> >     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xmlns:_20="testns"
> > xsi:type="_20"><_20:Test>1</_20:Test></_20:DocumentRoot>
> > 
> > But what I wanted was something valid like this :
> > 
> > <?xml version="1.0" encoding="UTF-8"?>
> > <Test xmlns="testns"
> >
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>3.1415926535897932
> > 384626433832795</Test>
> > 
> > Am I missing something? What would be an appropiate way to deal with
> > root-properties that are not containment properties?
> > 
> > /Chr
> > 
> > ---------------------------------------------------------------------
> > 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]
> 


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

Reply via email to