You can use the dumpNameSpace tool to dump the contents of a namespace accessed through a name server. The dumpNameSpace tool is based on Java Naming and Directory Interface (JNDI).
When you run the dumpNameSpace tool, the naming service must be active. The dumpNameSpace tool cannot dump namespaces local to the server process, such as those with java: and local: URL schemes. The local: namespace contains references to enterprise beans with local interfaces. Use the namespace dump utility for java:, local: and server namespaces to dump java: and local: namespaces.
The tool dumps the server root context for the server at the specified host and port unless you specify a non-default starting context which precludes it. The tool does not dump the server root contexts for other servers.
You can run the tool from a command line or using its program interface. This topic describes command-line invocations. To access the dumpNameSpace tool through its program interface, refer to the class com.ibm.websphere.naming.DumpNameSpace in the WebSphere® Application Server API documentation.
To run the tool from a command line, enter the dumpNameSpace command from the app_server_root/bin directory.
dumpNameSpace [[-keyword value]...]
If you run the dumpNameSpace tool with security enabled and the com.ibm.CORBA.loginSource property is set in the profile_root/properties/sas.client.props file, a login prompt is displayed.
If you cancel the login prompt, the dumpNameSpace tool continues outbound with an "UNAUTHENTICATED" credential. Thus, by default, an "UNAUTHENTICATED" credential is used that is equivalent to the "Everyone" access authorization policy. You can modify this default setting by changing the value for the com.ibm.CSI.performClientAuthenticationRequired property to true in the app_server_root/properties/sas.client.props file.
If you do not set the com.ibm.CORBA.loginSource property in the sas.client.props file, the dumpNameSpace tool continues outbound with the user name and password that is set in the credential.
If Kerberos (KRB5) is enabled for administrative authentication, the authenticationTarget supports both BasicAuth and KRB5. To use Kerberos authentication, you must update the sas.client.props, soap.client.props, and ipc.client.props files according to the connector type. When using Kerberos authentication, the user password does not flow across the wire. A one-way hash of the password identifies the client.
The keywords and associated values for the dumpNameSpace tool follow:
dumpNameSpace -host myhost.mycompany.comto display the namespace of the server running on myhost.mycompany.com.
For WebSphere Application Server servers:
-root option | Description |
---|---|
cell | DumpNameSpace default for product Version 5.0 or later servers. Dumps the tree starting at the cell root context. |
server | Dumps the tree starting at the server root context. |
node | Dumps the tree starting at the node root context. |
tree | Dumps the tree starting at the tree root context. |
applications | Dumps the tree starting at the applications root context. |
For all WebSphere Application Server and other name servers:
-root option | Description |
---|---|
default | Dumps the tree starting at the initial context which JNDI returns by default for that server type. This is the only -root option that is compatible with non-product name servers. |
-format option | Description |
---|---|
jndi | The default. Displays name components as atomic strings. |
ins | Shows name components parsed using Interoperable Naming Service (INS) rules (id.kind). |
-report option | Description |
---|---|
short | The default. Dumps the binding name and bound object type. This output is also provided by JNDI Context.list(). |
long | Dumps the binding name, bound object type, local
object type, and string representation of the local object (that is,
the IORs, string values, and other values that are printed). For objects of user-defined classes to display correctly with the long report option, you might need to add their containing directories to the list of directories searched. Set the environment variable WAS_USER_DIRS at a command line. The value can include one or more directories. All .zip, .jar, and .class files in the specified directories can then be resolved by the class loader when running the dumpNameSpace tool. |
The dumpNameSpace tool has the following return codes:
Return code | Description |
---|---|
0 | Normal system exit. No error resulted from running dumpNameSpace. |
1 | Error in getting the starting context |
2 | Other error occurred with exception. Running dumpNameSpace resulted in an error other than an error in getting the starting context. |
3 | Unsupported option specified |