
Within the Internet, the Atom standard is used to describe “feeds” of information. This is typically used by news web sites, to publish a list a of new articles that are available for reading, for example. It is a simple XML-based format that is loaded via an HTTP request.
The NetWeaver Business Client runtime exports the OData format (which is an extension of the Atom Syndication Format, see also http://www.odata.org/developers/protocols/atom-format) for publishing role information in a standard way that is understandable for other software. The base URL for accessing atom services is:
http://<server>/nwbc/~atom
At the root level, a service catalogue is rendered, containing a list of services currently active for publishing. Example of NWBC root atom catalogue:
<xml version="1.0 encoding="UTF-8" standalone="yes" ?>
<service xml:base="https//<server>/nwbc/~atom"
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app"
xmlns="http://www.w3.org/2007/app">
<workspace>
<atom:title>Services</atom:title>
<collection href="roles">
<atom:title>Roles Services</atom:title>
</collection>
</workspace>
</service>
Entity |
Occurrence |
Description |
|---|---|---|
service xml:base attribute |
1 |
Service root node. Service base address. |
workspace |
1 |
Corresponds to the catalogue root node. |
atom:title |
1 |
Title of the catalogue and service / or embedded service catalogue names. |
collection href attribute (in collection) |
1..N |
Corresponds to every available service or service catalogue Relative URL for services or embedded catalogues (relative to xml:base). |
For navigation to published services or other catalogues just use xml:base and href. For the roles services, the URL would be:
https://<server>/nwbc/~atom/roles
Roles services catalogue is similar to the root catalogue listing the roles services as containing a collection list.
Example of a roles services catalogue:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<service xml:base="https://<server>/nwbc/~atom/roles/"
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app"
xmlns="http://www.w3.org/2007/app">
<workspace>
<atom:title>Roles Services</atom:title>
<collection href="list">
<atom:title>Roles List</atom:title>
</collection>
</workspace>
</service>
From within the roles services, use xml:base and href to access the role list. The URL is as follows:
https://<server>/nwbc/~atom/roles/list
The roles list service exports the list of roles assigned to each user with a high-level entry that can be imbedded into any HTML page to visualize this specific role.
As a result of the service call, you get a feed document containing OData entries, where one entry represents a specific role. The request is for the specific user currently logged, so the feed contains only the entries for roles assigned to the user.
If, for testing, such a service URL is called directly within a newer browser (for example, Firefox, Opera, Microsoft Internet Explorer 7 and higher), the browser itself recognizes the atom format and displays an HTML-rendered page for the content. To see the real XML representation of the data, use the View Source function of the browser.
Example of the response of roles list service:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<feed xml:base="https://<server>/nwbc/~atom/roles/"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns="http://www.w3.org/2005/Atom">
<title type="text">Roles List</title>
<id>https://<server>/nwbc/~atom/roles/list</id>
<updated>2010-04-16T12:23:00Z</updated>
<link rel="self" title="Roles List" href="list" rel>
<entry>
<title type="text">Employee Self Services</title>
<id>/nwbc/~atom/roles/list('SAP_ROLE_ESS')</id>
<updated>2010-04-16T14:23:00Z</updated>
<link rel="edit" title="Link" href="list('SAP_ROLE_ESS')" />
<link rel="alternate" type="text/html" href=" /nwbc/SAP_ROLE_ESS/~canvas;window=embedded/sitemap/" />
</entry>
</feed>
Entity |
Occurrence |
Description |
|---|---|---|
feed xml:base attribute title node id node updated node link rel=”self” node |
1
1 1 1 |
Root service node Base URL of the service catalogue (not a service!) Name of the service ID of the service, containing the absolute service URL Timestamp of the last role list change Relative link to a service, from catalogue base url |
entry node title node id node updated node link role=”edit” node link role=”alternate” node |
0..N 1 1 1 1 1 |
Entry nodes corresponding to every role assigned to the user Role name Unique ID of the role entry, which can be used to retrieve role information directly Timestamp of the last role modification to this role. Obligatory node for direct access to role modification. Currently not supported. Node with absolute link (attribute href) to a role service map |
The URL itself gives a sitemap for one specific role. For information about URL formats and generation, see 6.1 Generating an External Startup URL for NWBC. For information about background information on integrating NWBC for HTML into different portals, for example, Microsoft SharePoint, see 9.1 How To Integrate NWBC into a Microsoft SharePoint Portal.