Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<!—
Definieer DAC global resource in het bestand server.xml. Paden moeten absolute zijn:
windows: d:/fews/bin of d:/fews/hhnk_da; linux: /fews/bin of /fews/hhnk_da
-->
<GlobalNamingResources>
...
<Resource name="global_resource_naam" auth="Container"
            type="nl.wldelft.fews.system.data.dac.DataAccessComponent"			
            factory="nl.wldelft.fews.system.data.dac.DacBeanFactory"
            regionHome="absoluut pad naar fews_home_dir" 
            binPath="absoluut pad naar fews_bin_dir" />

</GlobalNamingResources>

Webservice (Umaquo example)

In the <Tomcat_installation> directory create a subdirectory 'fews'. Copy the war file containing the webservice application into this sub directory. Now create a Context XML configuration file for this webservice. Give this XML file an appropriate name that reflects the purpose of this webservice, as this is also the name you will see in the Tomcat Manager application list (eg. <fews_region_home>.xml).

The content of this file will vary depending on the implementation of your webservice. However ResourceLink element is always required to allow the webservice to connect to the global resource configured in server.xml.
Also make sure that the value for docBase points to your webservice war file in the fews subdirectory.

Code Block

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

</GlobalNamingResources>
!-- Location of specific AI war file. (Can be a symlink) -->
<Context docBase="${catalina.home}/fews/UmAquo.war" antiJARLocking="true" crossContext="true" >
    <!— 'clientConfigFileId' verwijst naar een FEWS configuratie bestand in de FEWS configuratie folder 'PiClientConfigFiles'. -->
     <Parameter name="clientConfigFileId" value="umaquo.properties" override="false"/>
    <!—resourceId moet gelijk zijn aan 'name' van 'ResourceLink' hieronder -->
     <Parameter name="resourceId" value=" resourcelink_naam " override="false"/>
     <Parameter name="serviceName" value="MetusDataService" override="false"/>
     <Parameter name="namespaceUri" value="http://umaquo.wldelft.nl" override="false"/>
     <Parameter name="portName" value="MetusDataServiceSoap" override="false"/>
    <!—  'umaquo_config_naam' is gelijk aan de bestandsnaam van dit configuratiebestand zonder toevoeging '.xml' -->
     <Parameter name="wsdl" value="http://localhost:8083/umaquo_config_naam/umaquo?wsdl" override="false"/>
    <!—  zet 'naam resoucelink'  gelijk aan 'naam global resouce'. 'naam global resource' moet gelijk zijn aan de DAC rousouce naam in het bestand 'server.xml'-->
     <ResourceLink name="resoucelink_naam"
                  global="global_resource_naam"
                  type="nl.wldelft.fews.system.data.dac.DataAccessComponent"/>

To deploy the webservice copy the Context XML configuration file to the <Tomcat_installation>/conf/Catalina/localhost directory.