ヘッダーをスキップ
Oracle Spatial開発者ガイド
11g リリース1(11.1)
E05682-03
  目次
目次
索引
索引

戻る
戻る
 
次へ
次へ
 

10 SpatialのWebサービスの概要

この章では、Oracle SpatialでサポートされるWebサービスについて説明します。Webサービスを使用すると、Oracle Spatialアプリケーションの開発者は、アプリケーション・ユーザーに対してフィーチャ・データおよびメタデータをWeb経由で提供できます。

この章の内容は次のとおりです。

10.1 SpatialのWebサービスの種類

Oracle Spatialでは、次の種類のWebサービスが提供されます。

Webサービスのセキュリティに関する考慮事項については、第17章を参照してください。

10.2 SpatialのWebサービスのユーザーの種類

一般的な業務では、SpatialのWebサービス・アプリケーションを実装するユーザーには、次のような種類のユーザーが含まれます。

管理者の立場から見ると、アプリケーション開発者もエンド・ユーザーもすべてユーザーです。これは、それぞれのニーズに合わせてデータベース・ユーザーを作成する必要があるためです。アプリケーション開発者は、空間表を作成および管理し、Oracle Spatialのファンクションおよびプロシージャを使用するための十分な権限を持つユーザーとして、データベースに接続します。これに対し、エンド・ユーザーは、通常、データへの読取り専用アクセスや制限付きの書込みアクセスなど、制限されたアクセス権限を持つデータベース・ユーザーとして、データベースにアクセスします。

SpatialのWebサービスに関する章は、エンド・ユーザー向けではなく、管理者およびアプリケーション開発者を対象としています。

10.3 SpatialのWebサービスのクライアントの設定

SpatialのWebサービスを使用するには、DBAロールを持つ管理者として、次の項目を確認する必要があります。

次に、Webサービスの動作を制御する<j2ee_home>/home/applications/sdows/sdows/WEB-INF/conf/WSConfig.xmlファイルを調べて変更します。例10-1に、Oracleが提供しているWSConfig.xmlファイルを示します。このファイルは、ご使用のシステム環境に合わせて変更する必要があります。このファイルおよびその他のファイルの変更方法については、(10.4項に示す)wsclient.jarデモ・ファイルのReadme.txtファイルを参照してください。

例10-1 WSConfig.xmlファイル

<?xml version="1.0"?>
<!-- This is the configuration file for Oracle 11g Spatial WS. -->
<!-- Note: All paths are resolved relative to where the WEB-INF directory
           is located, unless specified as an absolute path name.
-->

<WSConfig>

  <!-- ****************************************************************** -->
  <!-- ************************ Logging Settings ************************ -->
  <!-- ****************************************************************** -->

  <!-- Uncomment the following to modify logging. Possible values are:
       log_level = "fatal"│"error"│"warn"│"info"│"debug"│"finest"
                 default: info) ;
       log_thread_name = "true" │ "false" ;
       log_time = "true" │ "false" ;
       one or more log_output elements.
  -->
  <!--
    <logging log_level="info" log_thread_name="false"
             log_time="true">
       <log_output name="System.err" />
       <log_output name="log/ws.log" />
    </logging>
  -->

  <!-- ****************************************************************** -->
  <!-- ********************** WFS Cache Settings ************************ -->
  <!-- ****************************************************************** -->

   <!--
    Uncomment the cached_feature_types tag to specify the list of feature types that are cached.
    By default no feature types are cached.
   -->
   <!--
   <cached_feature_types>
        <feature_type ns="http://www.example.com/myns1" name="ROADS1" />
        <feature_type ns="http://www.example.com/myns2" name="HIGHWAYS" />
   </cached_feature_types>
   -->

   <!--
    Uncomment the wfs_cache_sync_interval tag to specify the interval in
    milliseconds in which the WFS Cache Synchronization thread will run.
    Default is 10000 millisec.
   -->
   <!--
   <wfs_cache_sync_interval>10000</wfs_cache_sync_interval>
   -->


  <!-- ****************************************************************** -->
  <!-- ********************* WFS Parameters********************* -->
  <!-- ****************************************************************** -->


   <!--
    Uncomment the wfs_admin_conn_name tag to specify the name of the connection in oc4j
    data-sources.xml configuration file for the spatial_wfs_admin_usr.
    Default value is jdbc/WFS_ADMIN_CONN_NAME.
   -->
   <!--
     <wfs_admin_conn_name>jdbc/WFS_ADMIN_CONN_NAME</wfs_admin_conn_name>
   -->

   <!--
    Uncomment the wfs_query_timeout tag to specify the query timeout value,
    which is used, when server-side locking API is called.
    The value of this tag can be a non-negative integer, and its unit is seconds.
    Default value is 10 seconds.
   -->
   <!--
     <wfs_query_timeout>10</wfs_query_timeout>
   -->

    <!--
    Uncomment the wfs_lock_expiry tag to configure the default wfs lock expiry value,
    which is the expiry time for wfs locks, if lock expiry value is not
    explicitly specified in GetFeatureWithLock or LockFeature requests.
    The value of this tag can be a non-negative integer, and its unit is minutes.
    Default value is 4 minutes.
   -->
   <!--
     <wfs_lock_expiry>4</wfs_lock_expiry>
   -->

    <!--
    Uncomment the wfs_xsd_loc_url tag to specify the URL of WFS / GML 2.1.2 specification XSDs on your server.
    This MUST be provided.
    -->

    <!--
     <wfs_xsd_loc_url>http://machine:port/xsds/</wfs_xsd_loc_url>
    -->

    <!--
    Uncomment the wfs_ex_xsd_loc_url tag to specify the URL of OGC Exception specification XSDs on your server.
    WFS Exceptions are reports as per this XSD. If this tag is not provided then it will be initialized with
    the value provided for wfs_xsd_loc_url (by default).
    -->

    <!--
     <wfs_ex_xsd_loc_url>http://machine:port/xsds/</wfs_ex_xsd_loc_url>
    -->


    <!--
    Uncomment the gml3_xsd_loc_url tag to specify the URL of GML 3.1.1 specification XSDs on your server.
    This is needed ONLY when using GML3.1.1.
    -->

    <!--
     <gml3_xsd_loc_url>http://machine:port/xsds/</gml3_xsd_loc_url>
    -->

   <!-- ****************************************************************** -->
   <!-- ********************** CSW Cache Settings ************************ -->
   <!-- ****************************************************************** -->

   <!--
   <cached_record_types>
        <record_type ns="http://www.opengis.net/cat/csw" name="Record" />
   </cached_record_types>
   <csw_cache_sync_interval>10000</csw_cache_sync_interval>
   <csw_cache_id>CSW_CACHE_ID</csw_cache_id>
   -->

   <!-- ****************************************************************** -->
   <!-- ********************* CSW Parameters********************* -->
   <!-- ****************************************************************** -->
   <!--
     <csw_admin_conn_name>CSW_ADMIN_CONN_NAME</csw_admin_conn_name>
   -->

    <!--
    Uncomment the csw_xsd_loc_url tag to specify the URL of CSW 2.0.0 specification XSDs on your server.
    -->

    <!--
     <csw_xsd_loc_url>http://machine:port/xsds/</csw_xsd_loc_url>
    -->

    <!--
    Uncomment the csw_ex_xsd_loc_url tag to specify the URL of OWS Exception specification XSDs on your server.
    CSW Exceptions are reports as per this XSD. If this tag is not provided then it will be initialized with
    the value provided for csw_xsd_loc_url (by default).
    This MUST be provided if you are running CSW.
    -->
    <!--
     <csw_ex_xsd_loc_url>http://machine:port/xsds/</csw_ex_xsd_loc_url>
    -->


  <!-- ****************************************************************** -->
  <!-- ********************* Guest and XML user parameters ************** -->
  <!-- ****************************************************************** -->

  <Handlers>
    <OpenLS>
      <JavaClass>           oracle.spatial.ws.openls.OpenLsHandler </JavaClass>
      <Anonymous_xml_user>  SpatialWsXmlUser                       </Anonymous_xml_user>
      <Proxy_management>
        <Proxy_authentication/>

        <!--
          or
            <Application_user_management/>
          or
            <Fixed_app_user/>
          -->

      </Proxy_management>
    </OpenLS>

    <WFS>
      <JavaClass>           oracle.spatial.wfs.WFSHandler </JavaClass>
      <Anonymous_xml_user>  SpatialWsXmlUser                       </Anonymous_xml_user>
      <Proxy_management>    <Proxy_authentication/>                </Proxy_management>
    </WFS>
    <CSW>
      <JavaClass>           oracle.spatial.csw.CSWHandler </JavaClass>
      <Anonymous_xml_user>  SpatialWsXmlUser                       </Anonymous_xml_user>
      <Proxy_management>    <Proxy_authentication/>                </Proxy_management>
    </CSW>
    <SpatialWS_Sdo_Request>
      <JavaClass>           oracle.spatial.ws.svrproxy.SdoRequestHandler </JavaClass>
      <Anonymous_xml_user>  SpatialWsXmlUser                       </Anonymous_xml_user>
      <Proxy_management>    <Proxy_authentication/>                </Proxy_management>
    </SpatialWS_Sdo_Request>
    <SpatialWS_Sdo_Test_Request>
      <JavaClass>           oracle.spatial.ws.svrproxy.SdoTestRequestHandler </JavaClass>
      <Anonymous_xml_user>  SpatialWsXmlUser                       </Anonymous_xml_user>
      <Proxy_management>    <Proxy_authentication/>                </Proxy_management>
    </SpatialWS_Sdo_Test_Request>
    <Network>
      <JavaClass>           oracle.spatial.network.xml.NetworkWSHandler </JavaClass>
      <Proxy_management>    <Fixed_app_user/>                      </Proxy_management>
    </Network>
  </Handlers>
</WSConfig>

また、ご使用の環境でサポートするWebサービスに応じて、特定のタスクを実行する必要があります。権限を作成し、データベース・ユーザーに付与する必要がある場合があります。さらに、特別なデータ(ジオコーディング用など)のダウンロードおよびロード、または構成ファイルの変更が必要な場合もあります。特定の要件については、個別のWebサービスに関する章を参照してください。

10.4 サンプルJavaクライアントのデモ・ファイル

SpatialのWebサービスをすぐに使用できるようにするために、Oracleでは、ソース・コードを含む.jarファイル(wsclient.jar)、およびサンプルJavaクライアントを設定するための関連ファイルが提供されています。このファイルを使用するには、次の手順を実行します。

  1. Spatialのデモ・ディレクトリで、wsclient.jarを検索します。

  2. 選択したディレクトリに、wsclient.jarを展開(解凍)します。

    .jarファイルのすべてのファイルの最上位ディレクトリは、srcという名前になります。

  3. srcディレクトリにあるReadme.txtファイルを参照し、その手順に従ってください。

    Readme.txtファイルには、詳細な説明とガイドラインが記載されています。