Registry Services might serialize the output of an HTTP GET request for a Registration Record with an rdf:Description in the outer XML element

Technote (troubleshooting)


Problem(Abstract)


Any application that attempts to parse the output of HTTP GET requests with a simple XML parser can receive different yet valid XML representations.

Symptom

The RDF (Resource Description Framework) specification allows for the outer element of the XML representation of a resource to be an rdf:Description element, even when the caller sets the Accept header of a request as application/xml.

This may be a problem for client applications attempting to parse the output for Registry Services as plain XML documents, expecting the outer element to reflect one of the rdf:type elements in the underlying resources.


Resolving the problem

Registry Services serializes the output of an HTTP GET request for a Registration Record with an rdf:Description field in the outer XML element for the properties.

For example, the following two Registration Records represent the same RDF model:

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:art="http://jazz.net/ns/admin#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:crtv="http://open-services.net/ns/crtv#"
...>
<rdf:Description rdf:about="http://IBM5DV8ITHBOHQ:16311/admin/services/adminresources/resource/222">
<rdf:type rdf:resource="http://jazz.net/ns/admin#1"/>
<rdf:type rdf:resource="http://jazz.net/ns/admin#AdministrableResource"/>
...
</rdf:Description>
</rdf:RDF>

Instead of in a more compact format, as shown in the following example:

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:art="http://jazz.net/ns/admin#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:crtv="http://open-services.net/ns/crtv#"
...>
<art:AdministrableResource rdf:about="http://IBM5DV8ITHBOHQ:16311/admin/services/adminresources/resource/222">
<rdf:type rdf:resource="http://jazz.net/ns/admin#1"/>
...
</art:AdministrableResource>
</rdf:RDF>


Any application that attempts to parse the output of HTTP GET requests for Registry Services with a simple XML parser instead of an RDF/XML compliant parser must not depend on one of these formats, even if the Media Type is set to Accept: application/xml. Both examples show equally valid formats of abbreviated RDF/XML representation.

For more information, see http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-multiple-property-elements.

Related information

Retrieving Registration Records

Rate this page:

(0 users)Average rating

Document information


More support for:

Tivoli Components
Jazz for Service Management

Software version:

1.1

Operating system(s):

AIX, Linux, Windows

Reference #:

1627012

Modified date:

2014-03-31

Translate my page

Machine Translation

Content navigation