2 Replies Latest reply: Jan 26, 2011 12:58 AM by 765320 RSS

    Best Practices for Accessing the Configuration data Modelled as XML File in

    765320
      Hi,
      I refer the couple of blof posts/Forum threads on How to model and access the Configuration data as XML inside OSB.

      One of the easiest and way is to
      Re: OSB: What is best practice for reading configuration information

      Another could be
      Uploading XML data as .xq file (Creating .xq file copy paste all the Configuration as XML )

      I need expert answers for following.

      1] I have .xsd file which is representing the Configuration data. Structure of XSD is
      <FrameworkConfig>
      <Config type="common" key="someKey">proprtyvalue</Config>
      <FrameworkConfig>

      2] As my project will move from one env to another the property-value will change according to the Environment...

      For Dev:
      <FrameworkConfig>
      <Config type="common" key="someKey">proprtyvalue_Dev</Config>
      <FrameworkConfig>

      For Stage :
      <FrameworkConfig>
      <Config type="common" key="someKey">proprtyvalue_Stage</Config>
      <FrameworkConfig>

      3] Let say I create the following Folder structure to store the Configuration file specific for dev/stage/prod instance

      OSB Project Folder
      |
      |---Dev
      |
      |--Dev_Config_file.xml
      |
      |---Stage
      |
      |--Stahe_Config_file.xml
      |
      |---Prod
      |
      |-Prod_Config_file.xml

      4] I need a way to load these property file as xml element/variable inside OSb message flow.?? I can't use XPath function fn:doc("URL") coz I don't know exact path of XMl on deployed server.

      5] Also I need to lookup/model the value which will specify the current server type(Dev/Stage/prod) on which OSB MF is running. Let say any construct which will act as a Global configuration and can be acccessible inside the OSb message flow. If I get the vaalue for the Global variable as Dev means I will load the xml config file under the Dev Directory @runtime containing key value pair for Dev environment.

      6] This Re: OSB: What is best practice for reading configuration information
      suggest the designing of the web application which will serve the xml file over the http protocol and getting the contents into variable (which in turn can be used in OSB message flow). Can we address this problem without creating the extra Project and adding the Dependencies? I read configuration file approach too..but the sample configuration file doesn't show entry of .xml file as resources

      Hope I am clear...I really appreciate your comments and suggestion..

      Sushil

      Edited by: Sushil Deshpande on Jan 24, 2011 10:56 AM