Hi there!

I just like to let you know that I've finally been successful with my request for 
storing data across invocations of SOAP thanks to the idea of Scott. I was even able 
to read out configuration data from the server.xml file of Tomcat.

If you're curious how I did this, just follow the next few lines (these lines have 
been heavily supported by the input of Scott Nichol):

  public String queryMyServer(SOAPContext ctx, String myparam1)
  {
        HttpServlet servlet = (HttpServlet)ctx.getProperty(Constants.BAG_HTTPSERVLET);
        ServletContext context = servlet.getServletContext();

        // read out all parameters available in the servlet context
        Enumeration enum = ctx.getPropertyNames();
        while (enum.hasMoreElements()  ) {
                String key = (String) enum.nextElement();
                System.out.println("key: " + key);
        }

        // read out ServerUrl from server.conf file (
        String host = context.getInitParameter("ServerUrl");

        // ... continue
}

extract from server.xml:

        <Context crossContext="true" debug="0" docBase="MyApp" path="/MyApp" 
reloadable="true">
           <Parameter name="ServerUrl" override="false" value="http://myserver"/>
        </Context>

here we go!

Mit freundlichen Grüßen
Mag. Ing. Johannes Fiala
===============================================
Fiala Web Development GmbH
---------------------------------------------------------
Anschrift: Anton Baumgartner Strasse 7/1, A-1230 Wien
Telefon: +43 1 662 44 19
Telefax: +43 1 662 90 84
Email: [EMAIL PROTECTED]
Web: http://www.fwd.at
===============================================

HIER KAUFEN DIE SCHLAUEN: http://www.softwarediskont.com
powered by Fiala Web Development GmbH.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to