Search code examples
osgiblueprint-osgi

How to specify enum in osgi blueprint xml?


I m trying to use Dependency injection with OSGI blueprint.
I want to construct enum object/s by specifying it in XML DSL.

In Spring context XML this would look like -

 <bean id="MyTestEnum" class="com.foo.TestEnum"
        factory-method="valueOf">
        <constructor-arg>
            <value>TYPEA</value>
        </constructor-arg>
    </bean>

How to achieve this in OSGI Blueprint XML file? I see the schema validation error at tag..

Appreciate any pointers!

Thanks.


Solution

  • Try replacing the constructor-arg block with

     <argument value="TYPEA"/>