axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Sauthier <Guillaume.Sauth...@Bull.Net>
Subject Re: web service configuration
Date Wed, 01 Oct 2003 08:36:21 GMT
The init-param tag doesn't look like the one U are using !
Real one :
<init-param>
 <param-name>Param_name</param-name>
 <param-value>Param_Value</param-value>
</init-param>

Do not use <init-param> tag with attributes ! The XML you produced is
not DTD conformant.

Regards

Guillaume

Uli Magsaam wrote:
> 
> Hi,
> 
> I try to write a little web service using AXIS. Everything works fine
> but now I want to configure my web service by parsing the name of a
> configuration file to it. To get this name of the configuration file I
> tried the following in my implementation file (...SoapBindingImpl.java:
> HttpServlet httpServlet =
> (HttpServlet)MessageContext.getCurrentContext().getProperty(
> HTTPConstants.MC_HTTP_SERVLET );
> ServletContext servletContext = httpServlet.getServletContext();
> configFile = servletContext.getInitParameter( "configFile" );
> 
> I put the initialization parameter 'configFile' in the web.xml file but
> when I try to read it, I always receive NULL.
> 
> My web.xml file is here (I put the init-param tag in all servlets
> because I don't know which one is used):
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <!DOCTYPE web-app
>      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
>      "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
> 
> <web-app>
>    <display-name>Apache-Axis</display-name>
>    <servlet>
>      <servlet-name>AxisServlet</servlet-name>
>      <display-name>Apache-Axis Servlet</display-name>
>      <servlet-class>
>          org.apache.axis.transport.http.AxisServlet
>      </servlet-class>
>      <init-param configFile='/opt/test/cfg/Test.cfg'/>
>    </servlet>
> 
>    <servlet>
>      <servlet-name>AdminServlet</servlet-name>
>      <display-name>Axis Admin Servlet</display-name>
>      <servlet-class>
>          org.apache.axis.transport.http.AdminServlet
>      </servlet-class>
>      <load-on-startup>100</load-on-startup>
>      <init-param configFile='/opt/test/cfg/Test.cfg'/>
>    </servlet>
> 
>    <servlet>
>      <servlet-name>SOAPMonitorService</servlet-name>
>      <display-name>SOAPMonitorService</display-name>
>      <servlet-class>
>          org.apache.axis.monitor.SOAPMonitorService
>      </servlet-class>
>      <init-param>
>        <param-name>SOAPMonitorPort</param-name>
>        <param-value>5001</param-value>
>      </init-param>
>      <load-on-startup>100</load-on-startup>
>      <init-param configFile='/opt/test/cfg/Test.cfg'/>
>    </servlet>
> 
>    <servlet-mapping>
>      <servlet-name>AxisServlet</servlet-name>
>      <url-pattern>/servlet/AxisServlet</url-pattern>
>    </servlet-mapping>
> 
>    <servlet-mapping>
>      <servlet-name>AxisServlet</servlet-name>
>      <url-pattern>*.jws</url-pattern>
>    </servlet-mapping>
> 
>    <servlet-mapping>
>      <servlet-name>AxisServlet</servlet-name>
>      <url-pattern>/services/*</url-pattern>
>    </servlet-mapping>
> 
>    <servlet-mapping>
>      <servlet-name>SOAPMonitorService</servlet-name>
>      <url-pattern>/SOAPMonitor</url-pattern>
>    </servlet-mapping>
> 
>   <!-- uncomment this if you want the admin servlet -->
>   <!--
>    <servlet-mapping>
>      <servlet-name>AdminServlet</servlet-name>
>      <url-pattern>/servlet/AdminServlet</url-pattern>
>    </servlet-mapping>
>   -->
>    <welcome-file-list id="WelcomeFileList_1">
>      <welcome-file>index.html</welcome-file>
>      <welcome-file>index.jsp</welcome-file>
>      <welcome-file>index.jws</welcome-file>
>    </welcome-file-list>
> 
> </web-app>
> 
> Many thanks for any hint
> 
> Ulrich Magsaam

Mime
View raw message