Package wwsrc_app_xml
This package contains the HTTP interface to wwsrc_xmlgen which can
be used for representing Portal Items, Pages and ACLs as XML documents.
It also includes the APIs for generating the XSDs for these XML documents.
See the wwsrc_xmlgen package spec for details of the APIs to this
package.
The package provides access to the following:
o HTTP API for XML for a portal Item, Page, ACL or Taxonomy
o HTTP API for an XSD for the XDB, Portal or Custom XML Schema Documents
It is designed to granted to PUBLIC and so can be used via the HTTP
interface as an entrypoint to Portal for a content crawler.
For the crawler to be accessible via mod_plsql the following must be
executed in SQL*Plus:
grant execute on wwsrc_app_xml to public
/
- Scope:
-
Public
| Constant Summary |
BOOL_FALSE
Indicates False value for a True/False parameter in the URL. | pls_integer |
BOOL_TRUE
Indicates True value for a True/False parameter in the URL. | pls_integer |
DEBUG_CONSUMER
The name of the debug consumer used in sbr_queue_peek(). | varchar2(61) |
| Function/Procedure Summary |
get
Return an XML representation of a resource to a client via mod_plsql. | |
get_ctm_xsd
HTTP 'get' of CTM XMLSchema Document. | |
get_ptl_xsd
HTTP 'get' of PTL XMLSchema Document. | |
get_xdb_xsd
HTTP 'get' of XDB XMLSchema Document. | |
recentchanges
Renders the XML document containing the list of resources that have
changed since p_since, for the given page group. | |
BOOL_FALSE
BOOL_FALSE constant pls_integer := 0
-
Indicates False value for a True/False parameter in the URL.
Some parameters passed in the URL take True/False values, this
constant should be used as the value for False.
BOOL_TRUE
BOOL_TRUE constant pls_integer := 1
-
Indicates True value for a True/False parameter in the URL.
Some parameters passed in the URL take True/False values, this
constant should be used as the value for True.
DEBUG_CONSUMER
DEBUG_CONSUMER constant varchar2(61) := 'SBR_QUEUE_PEEK'
-
The name of the debug consumer used in sbr_queue_peek().
| Function/Procedure Detail |
get
procedure get(
p_page_site_id in number default null,
p_page_id in number default null,
p_thing_site_id in number default null,
p_thing_id in number default null,
p_language in varchar2 default null,
p_acl_uid in varchar2 default null,
p_taxonomy_uid in varchar2 default null,
p_xml_declaration in pls_integer default bool_true,
p_include_metadata in pls_integer default bool_true,
p_include_contents in pls_integer default bool_false,
p_include_acls in pls_integer default bool_false,
p_include_children in pls_integer default bool_true,
p_depth in number default null,
p_allprops in number default null
) -
Return an XML representation of a resource to a client via mod_plsql.
This function returns an XML representation of a resource (item, page
or ACL) to a client (such as an XML enabled Web Browser) via
htp calls. It can be called from a browser by entering a URL such as
http://portal:port/pls/dad/schema.wwsrc_app_xml.get
?p_page_site_id=1&p_page_id=1&p_thing_id=12345
If no parameters are passed in, the top level XML is returned with
ChildURL elements containing URLs to all of the root pages of the page
groups in the portal. This should be used as the starting point for
all crawls.
To request a page use:
p_page_site_id, p_page_id
To request an item use:
p_page_site_id, p_page_id, p_thing_site_id, p_thing_id
To request an ACL use:
p_acl_uid
To request a Taxonomy Element use:
p_taxonomy_uid
If only p_page_site_id and p_page_id are passed in then the XML
representation of that page is produced, if the p_thing_site_id and
p_thing_id are also passed in, then the XML representation of that item
is produced.
If p_language is not passed in, or the language is not available, then
the default language of the page group is used to produce the XML.
In the normal case, p_language and p_user would be null.
If p_acl_uid is passed in, then the ACL identified by this parameter value
is generated as a stand alone resource. The other parameters have no
effect in this case.
Note that if p_acl_uid is passed in, the p_page_site_id, p_page_id,
p_thing_site_id, p_thing_id, p_taxonomy_uid are not permitted to be passed
in (an internal exception will be raised). The other parameters will be
ignored.
If p_taxonomy_uid is passed in, then the Taxonomy Element identified by
this parameter value is generated as a stand alone resource.
The other parameters have no effect in this case.
Note that if p_taxonomy_uid is passed in, the p_page_site_id, p_page_id,
p_thing_site_id, p_thing_id, p_acl_uid are not permitted to be passed in
(an internal exception will be raised). The other parameters will be
ignored.
Examples:
1) Top Level call to start the crawl:
http://portal:port/pls/dad/schema.wwsrc_app_xml.get
2) Request for the XML for a specific page in the portal
http://portal:port/pls/dad/schema.wwsrc_app_xml.get
?p_page_site_id=1&p_page_id=1
3) Request for the XML for a specific item in the portal
http://portal:port/pls/dad/schema.wwsrc_app_xml.get
?p_page_site_id=1&p_page_id=1&p_thing_id=12345
4) Request for the XML for a specific item in the portal in French
including the base64 encoded contents in the XML
http://portal:port/pls/dad/schema.wwsrc_app_xml.get
?p_page_site_id=1&p_page_id=1&p_thing_id=12345&p_language=fr
&p_include_xml=1
5) Request for the XML for a standalone ACL
http://portal:port/pls/dad/schema.wwsrc_app_xml.get
?p_acl_uid=P33_43674
6) Request for the XML for a standalone Taxonomy Element
http://portal:port/pls/dad/schema.wwsrc_app_xml.get
?p_taxonomy_uid=C0_30
This method is also used for the Oracle Ultrasearch Specific Crawl
returning XML in a DAV PROPFIND-like format.
Depth 0, allprops 0 (href of current resource only)
Depth 0, allprops 1 (href + metadata of current resource only)
Depth 1, allprops 0 (href of current resource only + children)
Depth 1, allprops 1 (href + metadata of current resource + children)
If p_depth is null, then it is assumed to be a normal crawl request.
For all requests:
If any errors occur such as being unable to find a resource a 404 HTTP
response (NOT FOUND) will be returned, and if the ESE user doesn't
have enough permission to view the resource then a 403 HTTP response
(PERMISSION DENIED) will be returned. If any unexpected exceptions occur
a 500 HTTP response (INTERNAL SERVER ERROR) will be returned instead.
The diagnostics log file should indicate what has gone wrong. 404s can
be safely ignored (unless they occur all of the time), 403s mean that
something is wrong with the Search Engine OID Authentication, 500s mean
that an internal error has occurred in Portal whilst trying to provide
the response.
- Parameters:
p_page_site_id - The page site idp_page_id - The page id in the sitep_thing_site_id - The thing site id (defaults to p_page_site_id)p_thing_id - The thing id of the itemp_language - The language of the resourcep_acl_uid - The ACL Identifierp_taxonomy_uid - The Taxonomy Identifierp_xml_declaration - True - include <? xml /> and <PortalContent> in XML
False - don't include xml decl and <PortalContent>p_include_metadata - True - Include resource metadata
False - Don't include resource metadatap_include_contents - True - Include tag with base64 encoded
document contents
False - Don't include document contentsp_include_acls - True - Include Access Control List
False - Don't include ACLsp_include_children - True - Include tags holding links to resource's
children (for crawling)
False - Don't include links to child resourcesp_depth - GET Depth (0 or 1 - Ultrasearch, null otherwise)p_allprops - For Ultrasearch, indicate whether to get the
properties or just the links to the resources
Use, 0 for no properties, 1 for all properties
or null when not applicable (when p_depth
is null this setting is ignored).
get_ctm_xsd
procedure get_ctm_xsd
-
HTTP 'get' of CTM XMLSchema Document.
http://portal:port/pls/dad/schema.wwsrc_app_xml.get_ctm_xsd
get_ptl_xsd
procedure get_ptl_xsd
-
HTTP 'get' of PTL XMLSchema Document.
http://portal:port/pls/dad/schema.wwsrc_app_xml.get_ptl_xsd
get_xdb_xsd
procedure get_xdb_xsd
-
HTTP 'get' of XDB XMLSchema Document.
http://portal:port/pls/dad/schema.wwsrc_app_xml.get_xdb_xsd
recentchanges
procedure recentchanges(
p_since in varchar2 default null,
p_site_id in number default null
) -
Renders the XML document containing the list of resources that have
changed since p_since, for the given page group.
If both parameters are passed in as null, then the list of page groups
available to search in is returned.
- Parameters:
p_since - The date from which to return updated objects from
the format should be YYYY-MM-DD"T"HH24:MI:SS
or pass in null for changes in the last 24 hours.p_site_id - The page group id to examine