Ashish,

I implemented the on-the-fly property creation support over the weekend 
(see https://issues.apache.org/jira/browse/TUSCANY-1211).

You should now be able to do what you asked:

body.setDataObject("anyType",DataObject);

Let me know how it works.

Thanks,
Frank


"Ashish Panchal" <[EMAIL PROTECTED]> wrote on 04/12/2007 10:44:13 AM:

> Thanks for reply Frank,
> 
> I tried, but Iam not able to find any method 'getOpenContentProperty' in
> commonj.sdo.helper.TypeHelper. It seems that this method will return a
> property. What Iam trying to do is something  like -
> 
> body.setDataObject("anyType",DataObject);
> 
> where anyType is defined in schema as  -
> <xsd:complexType>
>     <xsd:sequence>
>         <xsd:any maxOccurs="1" minOccurs="1" />
>     </xsd:sequence>
>  </xsd:complexType>
> 
> and DataObject is the object created by arbitrary input xml.
> 
> Ashish
> 
> 
> ----- Original Message ----- 
> From: "Frank Budinsky" <[EMAIL PROTECTED]>
> To: <tuscany-user@ws.apache.org>
> Sent: Wednesday, April 11, 2007 11:12 PM
> Subject: Re: xsd:any problem
> 
> 
> > Hi Ashish,
> >
> > I'm not sure what you tried, but something like this should work:
> >
> >   body.setDataObject(typeHelper.getOpenContentProperty("the target
> > namespace???", "ServiceInput"), value);
> >
> > Frank.
> >
> > "Ashish Panchal" <[EMAIL PROTECTED]> wrote on 04/11/2007 12:00:50 PM:
> >
> > > Hi,
> > >
> > > Iam trying to create a dataobject of xsd which has one of the
> > > element as <xsd:any> type. Sample is -
> > >
> > > <xsd:element name="ServiceInput" type="ServiceInputType"/>
> > >
> > >  <xsd:complexType name="ServiceInputType">
> > >   <xsd:sequence>
> > >    <xsd:element minOccurs="0" ref="header"/>
> > >    <xsd:element minOccurs="0" ref="body"/>
> > >   </xsd:sequence>
> > >  </xsd:complexType>
> > >
> > > <xsd:element name="body">
> > >   <xsd:complexType>
> > >    <xsd:sequence>
> > >     <xsd:any maxOccurs="1" minOccurs="1" processContents="lax"/>
> > >    </xsd:sequence>
> > >   </xsd:complexType>
> > >  </xsd:element>
> > >
> > >
> > > The <xsd:any> is used to allow different xml under the 'body'
> > > element, as the incoming xml structure is not fixed.
> > > Data object for this xsd is created, but Iam not able to set the
> > > dataobject of the variable xml structure under the 'body' element.
> > >
> > > I would appreciate any help.
> > >
> > > Thanks
> > > Ashish
> >
> > ---------------------------------------------------------------------
> > 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