Server Configuration Details

The JibxSoap server must be configured in the WEB-INF/web.xml file for a web application (which will normally be deployed in the form of a war file). The actual jibxsoap.jar file must be included in the WEB-INF/lib directory of the same web application, and any classes used by the actual web service(s) must also be present in the same web application.

Here's an example of the JibxSoap configuration within a WEB-INF/web.xml file:

<web-app>
  
  <servlet>
    <servlet-name>soap_servlet</servlet-name>
    <servlet-class>org.jibx.soap.server.SOAPServlet</servlet-class>
    <init-param>
      <param-name>quake-service</param-name>
      <param-value>quake-service.xml</param-value>
    </init-param>
  </servlet>
  
  <servlet-mapping>
    <servlet-name>soap_servlet</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>
  
</web-app>

The <servlet> element in the sample configures JibxSoap to use the service definition file at WEB-INF/quake-service.xml to define a service named "quake-service". The <servlet-mapping> element) defines the path used to access the JibxSoap server. Here the path is just set to /, meaning that the JibxSoap server will by default handle all requests received for the containing web application. All together, this configures a single service that will be accessed at the path /quake-service within the web application.

For the example only a single service is configured; if you want to define multiple services using a single instance of the JibxSoap server you can do so by just using a separate <init-param> element for each service. The <param-name> child element gives the name of the service (which must be unique), while the <param-value> value is the corresponding service definition file name.

You can also define multiple instances of the JibxSoap server within your web application, and can combine the JibxSoap server with other servlet definitions.