Listing All Data Sources Administrative or General-Purpose

MapViewer XML Requests: Administrative and Other 7-5 For convenience, MapViewer lets you redefine a data source. Specifically, if a data source with the same name already exists, it is removed and then added using the new definition. If no data source with the name exists, a new data source is added. If an existing data source has the same name, host, port, SID, user name, password, mode, and number of mappers as specified in the request, the request is ignored. The redefine_data_source element has the following definition: ELEMENT non_map_request redefine_data_source ELEMENT redefine_data_source EMPTY ATTLIST redefine_data_source name CDATA REQUIRED container_ds CDATA IMPLIED jdbc_tns_name CDATA IMPLIED jdbc_host CDATA IMPLIED jdbc_port CDATA IMPLIED jdbc_sid CDATA IMPLIED jdbc_user CDATA IMPLIED jdbc_password CDATA IMPLIED jdbc_mode oci8 | thin IMPLIED number_of_mappers INTEGER REQUIRED The attributes and their explanations are the same as for the add_data_source element, which is described in Section 7.1.1 . The DTD for the response to a redefine_data_source request has the following format: ELEMENT non_map_response redefine_data_source ELEMENT redefine_data_source EMPTY ATTLIST redefine_data_source succeed true | false REQUIRED For example: ?xml version=1.0 ? non_map_response redefine_data_source succeed=true non_map_response

7.1.4 Listing All Data Sources Administrative or General-Purpose

The list_data_sources element lists all data sources known to the currently running MapViewer. It has the following definition: ELEMENT non_map_request list_data_sources ELEMENT list_data_sources EMPTY For example: ?xml version=1.0 standalone=yes? non_map_request list_data_sources non_map_request The DTD for the response to a list_data_sources request has the following format: ELEMENT non_map_response map_data_source_list ELEMENT map_data_source_list map_data_source 7-6 Oracle Fusion Middleware Users Guide for Oracle MapViewer ATTLIST map_data_source_list succeed true|false REQUIRED ELEMENT map_data_source EMPTY ATTLIST map_data_source name CDATA REQUIRED container_ds CDATA IMPLIED host CDATA IMPLIED sid CDATA IMPLIED port CDATA IMPLIED user CDATA IMPLIED mode CDATA IMPLIED numMappers CDATA REQUIRED For each data source: ■ If the user issuing the request is logged in as a MapViewer administrator, all data source information except the password for the database user is returned. ■ If the user issuing the request is not logged in as a MapViewer administrator, only the data source name is returned. The following example is a response that includes information about two data sources when the request is issued by a MapViewer administrator. ?xml version=1.0 ? non_map_response map_data_source_list succeed=true map_data_source name=mvdemo host=elocation.us.oracle.com sid=orcl port=1521 user=scott mode=thin numMappers=3 map_data_source name=geomedia host=geomedia.us.oracle.com sid=orcl port=8160 user=scott mode=oci8 numMappers=7 map_data_source_list non_map_response The following example is a response when the same request is issued by a user that is not a MapViewer administrator. ?xml version=1.0 ? non_map_response map_data_source_list succeed=true map_data_source name=mvdemo map_data_source name=geomedia map_data_source_list non_map_response

7.1.5 Checking the Existence of a Data Source General-Purpose