WebSphere Message Service Clients for C/C++ and .NET, Version 1.2 Operating Systems: Linux, Windows

URI format for XMS initial contexts

The location of the repository of administered objects is provided as a uniform resource indicator (URI). The format of the URI depends on the context type.

FileSystem context

For the FileSystem context, the URL gives the location of the file system based directory. The structure of the URL is as defined by RFC 1738, Uniform Resource Locators (URL): the URL has the prefix file://, and the syntax following this prefix is a valid definition of a file that can be opened on the system on which XMS is running.

This syntax can be platform-specific, and can use either '/ separators or '\' separators. Note that if you use '\', then each separator needs to be escaped by using an additional '\'. This prevents the C runtime or .NET framework from trying to interpret the separator as an escape character for what follows. Further, if the URI is coded as literal C strings in source code, the compiler also requires each '\' character to be escaped.

Examples of this syntax include:

file://myBindings
file:///admin/.bindings
file://\\admin\\.bindings
file://c:/admin/.bindings
file://c:\\admin\\.bindings
file://\\\\madison\\shared\\admin\\.bindings
file:///usr/admin/.bindings

The following examples show the syntax written as literal C strings within source code:

"file://c:\\\\admin\\\\.bindings"
"file://\\\\\\\\madison\\\\shared\\\\admin\\\\.bindings"

LDAP context

For the LDAP context, the basic structure of the URL is as defined by RFC 2255, The LDAP URL Format, with the case-insensitive prefix ldap://

The precise syntax is as follows:

LDAP://[Hostname][:Port][“/”[DistinguishedName]]

This syntax is as defined in the RFC but without support for any attributes, scope, filters or extensions.

Examples of this syntax include:

ldap://madison:389/cn=JMSData,dc=IBM,dc=UK
ldap://madison/cn=JMSData,dc=IBM,dc=UK
LDAP:///cn=JMSData,dc=IBM,dc=UK

WSS context

For the WSS context, the URL is in the form of a web services endpoint, with the prefix http:// or https://.

Alternatively, you can use the prefix cosnaming:// or wsvc://,

These two prefixes are interpreted as meaning that you are using a WSS context with the URL accessed over http, which enables the initial context type to be derived easily directly from the URL.

Examples of this syntax include:

http://madison.ibm.com:9080/xmsjndi/services/JndiLookup
cosnaming://madison/jndilookup
Related concepts
Supported types of administered object repository
Property mapping for administered objects
InitialContext properties
JNDI Lookup web service
Retrieval of administered objects
Related tasks
Creating administered objects
Creating an InitialContext
Related reference
Required connection factory properties
Required destination properties
InitialContext (for the C class)
InitialContext (for the C++ class)
InitialContext (for the .NET interface)
Properties of InitialContext

Concept topic

Terms of Use | Rate this page

Last updated: 7 Dec 2005

© Copyright IBM Corporation 2005. All Rights Reserved.