Hey all,
I want to read and write properties to a file that reside inside a service.
For instance:
this->provides("BodyService")->addProperty( "propBody",
propBody).doc("Property for Body." );
Then I want to write them to my file using
marshalling.writeProperties("prop.xml")
This returns true, but prop.xml is empty.
When putting this property right in the component (not in a service),
this->addProperty( "propBody", propBody ).doc( "Property for Body." );
marshalling works just fine and my property is written to my xm file.
Is this problem related to the earlier bug that we could not report ports
inside a service (see Ruben's patch 0001-enable-reporting-of-ports-which-are-
nested-in-Servic.patch of 10.12.2010).
Thanks,
Tinne
marshaling properties inside a service fails
On Fri, Jan 27, 2012 at 9:56 AM, Tinne De Laet
<tinne [dot] delaet [..] ...> wrote:
> Hey all,
>
> I want to read and write properties to a file that reside inside a service.
>
> For instance:
>
> this->provides("BodyService")->addProperty( "propBody",
> propBody).doc("Property for Body." );
>
> Then I want to write them to my file using
> marshalling.writeProperties("prop.xml")
>
> This returns true, but prop.xml is empty.
>
> When putting this property right in the component (not in a service),
>
> this->addProperty( "propBody", propBody ).doc( "Property for Body." );
>
> marshalling works just fine and my property is written to my xm file.
Marshalling is 'just' a service of its own, with its
features/capabilities. Marshalling Service properties is not
implemented in there.
You'll have to add an operation or extend the existing one to be able to do so.
Peter