CREATE WRAPPER statement - Examples for the XML wrapper
Use the CREATE WRAPPER statement to register the XML wrapper. The examples show the parameters that are required to access XML documents with and without a proxy server.
Registering a wrapper
If you are not using a proxy
server to access XML documents, the statement that you issue to register the
wrapper is:
CREATE WRAPPER xml_wrapper LIBRARY 'libdb2lsxml.a'; - xml_wrapper
- A name that you assign to the XML wrapper. Duplicate wrapper names are not allowed.
- LIBRARY 'libdb2lsxml.a'
- The name of the wrapper library file for federated servers that use AIX® operating systems.
Registering a wrapper for an HTTP proxy server
To
register a wrapper and specify an HTTP proxy server, use the following statement:
CREATE WRAPPER xml_wrapper LIBRARY 'libdb2lsxml.a'
OPTIONS (PROXY_TYPE 'HTTP', PROXY_SERVER_NAME 'proxy_http',
PROXY_SERVER_PORT '8080'); - PROXY_TYPE 'HTTP'
- Specifies the proxy type that is used to access the Internet when behind a firewall. The valid values are 'NONE', 'HTTP', or 'SOCKS'.
- PROXY_SERVER_NAME 'proxy_http'
- Specifies the proxy server name or IP address. This option is required if the value for the PROXY_TYPE server option is 'HTTP' or 'SOCKS'.
- PROXY_SERVER_PORT '8080'
- Specifies the proxy server port number. This option is required if the value for the PROXY_TYPE server option is 'HTTP' or 'SOCKS'.
Registering a wrapper for a SOCKS proxy server
To
register a wrapper and specify a SOCKS proxy server without authentication
information, use the following statement:
CREATE WRAPPER xml_wrapper LIBRARY 'libdb2lsxml.so'
OPTIONS (PROXY_TYPE 'SOCKS', PROXY_SERVER_NAME 'proxy_socks',
PROXY_SERVER_PORT '1081'); - LIBRARY 'libdb2lsxml.so'
- Specifies the name of the wrapper library file for federated servers that use Linux® and Solaris operating systems.
- PROXY_TYPE 'SOCKS'
- Specifies the proxy type that is used to access the Internet when behind a firewall. The valid values are 'NONE', 'HTTP', or 'SOCKS'.
- PROXY_SERVER_NAME 'proxy_socks'
- Specifies the proxy server name or IP address. This option is required if the value for the PROXY_TYPE server option is 'HTTP' or 'SOCKS'.
- PROXY_SERVER_PORT '1081'
- Specifies the proxy server port number. This option is required if the value for the PROXY_TYPE server option is 'HTTP' or 'SOCKS'.