2 Replies Latest reply on Aug 19, 2013 3:25 AM by Radomír Kadlec

    Not possible to make boolean values configurable in context

    Radomír Kadlec Newbie

      Hello,

      is it possible to make boolean values configurable in Servicemix/Karaf/Spring context?

       

      Example:

       

          <ctx:property-placeholder properties-ref="testProps" />

          <osgix:cm-properties id="testProps" persistent-id="test" />

       

          <cxfbc:consumer

              service="s"

              endpoint="e"

              locationURI="${s.url}"

              targetService="targetS"

              targetEndpoint="targetE"

              wsdl="${s.wsdl}"

              delegateToJaas="${s.authenticate}"

              >

       

      The first two substitutions are ok, but the last with boolean value not.

      When I add the last parameter to the cxfbc:consumer, it appears this error in the log:

      Caused by: org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: '${s.authenticate}' is not a valid value for 'boolean'.

      •    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)[:]*

       

      I suppose, why it is so:

      The xml schema file is readed, parsed and validated against xsd without substitutions.

      I suppose it, because in the log runs SAX Parser and shows not substituted value as wrong.

      In this time are other substitutions ok, because the definitions of the attributes locationURI and wsdl are of type string and the unsubstituted value is valid too.

      But the last attribute is of type boolean and therefore is the unsubstituted value wrong.

       

      Is there some way to make boolean attributes configurable from the properties file?

       

      I use apache-servicemix-4.4.1-fuse-07-11

       

      Thank you,

      Radomir