Results 1 to 2 of 2
  1. #1
    mgrootsch is offline Member
    Join Date
    Sep 2008
    Rep Power

    Default WSIT and environment-independence

    I have a wsit-client.xml. It contains import tags that reference other XML files. And all works fine.
    The challenge I'm facing is to make this environment-independent. In development environment, the files dev-file1.xml, dev-file2.xml should be referenced and in production environment, the files prod-file1.xml, prod-file2.xml should be referenced.

    Any ideas on how to do that? The thing is that we want to have just one WAR/EAR that can be deployed anywhere, regardless of the environment.
    The application runs in a JVM with an argument set (something like -Denvir=prod).

  2. #2
    mgrootsch is offline Member
    Join Date
    Sep 2008
    Rep Power


    This is what my current wsit-client.xml looks like:

    <?xml version="1.0" encoding="UTF-8"?>
    <definitions xmlns=""

    <import location="signatureService.xml" namespace="" />
    <import location="queryService.xml" namespace="" />
    <import location="utilService.xml" namespace="" />

    The three XMLs imported on the <import... lines should be different depending on the environment (dev, prod, etc.)
    I forgot to mention in my previous post that we also use Spring. I'm thinking about something Spring-like with property placeholders:
    <import location="${envir}-signatureService.xml" namespace="" />
    <import location="${envir}-queryService.xml" namespace="" />
    <import location="${envir}-utilService.xml" namespace="" />

    According to Molecular Voices Simple environmental independence with Spring,
    system properties are resolved too. I'd have to ship the XMLs for all environments in the same WAR but that's no problem for me.

    But the wsit-client.xml is not a Spring file right? I suppose that the placeholders would only be resolved if Spring recognizes the file as something familiar. I don't know how Spring does this. I suppose the line that contains ${envir}... would have to be in a <bean... tag.
    Or maybe I'm seeing it all wrong and this would never work because it is not Spring but the WSIT framework that reads this file.

    Do you think I can use Spring to solve this issue?

Similar Threads

  1. development in support environment
    By mac in forum Suggestions & Feedback
    Replies: 1
    Last Post: 12-22-2009, 05:34 PM
  2. WSIT username password token failed
    By fiqueudrue in forum NetBeans
    Replies: 1
    Last Post: 02-06-2009, 09:08 AM
  3. Environment for java
    By carl in forum New To Java
    Replies: 2
    Last Post: 07-31-2007, 09:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts