You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Chris Mildebrandt <ch...@plasticfrog.info> on 2007/05/23 15:30:51 UTC

Using the getAnyAttribute()

Hi,

We're having problems using statically generated SDOs to set undefined
attributes in our xml. In the schema, we have a line like this:

<xsd:anyAttribute namespace="##other" processContents="lax"/>

After getting the DataObject, I make a call to getAnyAttribute():

Sequence anyAttribute = person.getAnyAttribute();

All of my blind attempts to add values into this Sequence have
resulted in exceptions. I'm sure I'm doing something wrong. Does
anyone have an example of how to insert undefined attributes into this
structure?

Thanks,
-Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Using the getAnyAttribute()

Posted by Chris Mildebrandt <ch...@plasticfrog.info>.
Thanks Kelvin, that example helps us a bunch. I figured there was some
concept in there I wasn't grasping before.

Thanks again!
-Chris

On 5/24/07, kelvin goodson <ke...@gmail.com> wrote:
> Hi Chris
>    I couldn't find an example of this so I had a play and added a new test
> case at [1].
> Regards, Kelvin.
>
>
> [1]
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java
>
> On 23/05/07, Chris Mildebrandt <ch...@plasticfrog.info> wrote:
> >
> > Hi,
> >
> > We're having problems using statically generated SDOs to set undefined
> > attributes in our xml. In the schema, we have a line like this:
> >
> > <xsd:anyAttribute namespace="##other" processContents="lax"/>
> >
> > After getting the DataObject, I make a call to getAnyAttribute():
> >
> > Sequence anyAttribute = person.getAnyAttribute();
> >
> > All of my blind attempts to add values into this Sequence have
> > resulted in exceptions. I'm sure I'm doing something wrong. Does
> > anyone have an example of how to insert undefined attributes into this
> > structure?
> >
> > Thanks,
> > -Chris
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-user-help@ws.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Using the getAnyAttribute()

Posted by kelvin goodson <ke...@gmail.com>.
Hi Chris
   I couldn't find an example of this so I had a play and added a new test
case at [1].
Regards, Kelvin.


[1]
https://svn.apache.org/repos/asf/incubator/tuscany/java/sdo/tools/src/test/java/org/apache/tuscany/sdo/test/OpenContentTestCase.java

On 23/05/07, Chris Mildebrandt <ch...@plasticfrog.info> wrote:
>
> Hi,
>
> We're having problems using statically generated SDOs to set undefined
> attributes in our xml. In the schema, we have a line like this:
>
> <xsd:anyAttribute namespace="##other" processContents="lax"/>
>
> After getting the DataObject, I make a call to getAnyAttribute():
>
> Sequence anyAttribute = person.getAnyAttribute();
>
> All of my blind attempts to add values into this Sequence have
> resulted in exceptions. I'm sure I'm doing something wrong. Does
> anyone have an example of how to insert undefined attributes into this
> structure?
>
> Thanks,
> -Chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>