11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

494 CHAPTER <strong>11</strong> ■ APPLICATION DEVELOPMENTHTTP and FTP for XML DB<strong>Oracle</strong> XML DB is part of the standard database creation process. By default, the XDB schemais locked out of the database. You must enable the XDB schema and also set up the appropriateHTTP and/or FTP ports. The FTP port is not a requirement for native web services for XML DB.The ability to access the XML DB using HTTP or FTP is not a new <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>gfeature, but it is crucial to explain how to configure HTTP since it is the essence of enabling webservices for XML DB. The good news is that you can set up HTTP and FTP access to XML DBusing Enterprise Manager <strong>Database</strong> Console. Using Enterprise Manager <strong>Database</strong> Console,the setup process is as simple as clearing out the zeroed-out port numbers and resetting themto the desired port designations. The XML DB configuration URL is located in the XML <strong>Database</strong>section of the Schema tab. The XML DB Configuration screen even allows secure access to theXML DB repository using HTTPS.■Note By default, the HTTP and FTP ports for WebDB are 8080 and 2100, respectively. For securityconcerns, you should change the port numbers for HTTP and FTP.To confirm you have everything set up prior to HTTP or FTP access, you can use the lsnrctlstatus command. If everything is set up correctly, you should see line entries for HTTP andFTP similar to what is shown here as part of the lsnrctl status output:(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.dbaexpert.com)(PORT=8080))(Presentation=HTTP)(Session=RAW))(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.dbaexpert.com)(PORT=2100))(Presentation=FTP)(Session=RAW))Please remember that if FTP is enabled, files that are being transferred with FTP will beuploaded to the XML DB repository. You can control security for HTTP and FTP using accesscontrol lists (ACLs). Once you have successfully set up the HTTP port for XML DB, you can verifyconnectivity by pointing your URL to http://servername.domain.com:8080.You should at this point be prompted for the XDB user ID and password.Setup XML DB ServletFor security reasons, native web services for <strong>Oracle</strong> XML DB are not set up in the database. Youmust manually enable XML DB web services. There are a couple of steps needed to set up theXML DB servlet. First, as the sys user, you need to grant the XDB WEBSERVICES role to the user:SQL> grant XDB_WEBSERVICES to xdb;Grant succeeded.Alternatively, you can also grant the XDB_WEBSERVICES_OVER_HTTP role to the user. TheXDB_WEBSERVICES role allows only for HTTPS communication with the database. This role is arequirement for XML DB web services. The XDB_WEBSERVICES_OVER_HTTP role allows for HTTPtraffic.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!