exportMessages command to export (request and reply) messages for an endpoint for the period during which logging has been turned on. Exporting messages can be useful in testing and debugging.
You have the option of exporting messages to an XML file. If you do not specify a file, output is sent to the stdout.
IMPORTANT: Message logging must be turned on for this command to work. See Defining, Modifying, and Deleting Transactions, for information about message logging.
btmcli exportMessages -name name | -e endpointUrl [-bn bindingName] -baseDate date -baseTime time -duration minutes [-outputFile outputFile] [-max numberOfMessages] -sphereUrl sphereUrl -l username:password
|-n||-name||The friendly name of the endpoint for which messages are exported. See the discussion below.|
|-e||-endpointURL||The endpoint URL. If this is a web service, you can supply the actual URL to reach the endpoint. If this is another type of component, look in the Profile tab in the management console to determine the endpoint's URL.
See also the discussion below.
|-bn||-bindingName||The binding for the endpoint (for example, SOAP/HTTP). Use this parameter to disambiguate endpoint URLs with multiple bindings.|
|-baseDate||--||The start timestamp (date) in the format yyyy-MM-dd when messages are to be exported.|
|-baseTime||--||The start timestamp (time) in the format hh:mm:ss when messages are to be exported.|
|-duration||--||The time in minutes, starting from the base time during which logged messages are exported. Messages might be exported for a shorter time if the number of messages exported during the stated interval exceeds the value specified with the -max option.|
|-o||-outputFile||The path name of the file where messages are to be exported. The command fails if the output file already exists.
It is recommended that you specify an absolute path. If you specify a filename only, the file is created in the directory from where the host application server is launched.
IMPORTANT: If you specify a path, the command will work only if the process hosting Business Transaction Management has write access to the specified directory.
|-max||--||The maximum number of messages to export. If you don't specify a value, all messages will be exported for the specified interval.|
|-s||-sphereURL||The URL of the sphere.
This flag is not required if you have set the AP_SPHERE_URL environment variable for your sphere.
|-l||-userLogin||The username and password associated with the sphere, in the format: username:password. This set of credentials must belong to a user in the btmadmin role.
See Security Options in Accessing CLI Commands for information on furnishing login credentials.
You can encrypt passwords using the
You can specify the endpoint for which messages should be exported in the following ways:
Use the -e option if the endpoint URL is uniquely associated with a single endpoint.
The -e option is also useful to identify an endpoint that belongs to a replicated service; in this case, the endpoint name would not be unique, but the endpoint URL would.
Use the -n option to specify the friendly name of the endpoint. This is the preferred option if the specified name can uniquely identify the endpoint
The following command exports messages for the service
btmcli exportMessages -name MyShippingService -baseDate 2010-3-15 -baseTime 12:15:30 -duration 10 -s http://localhost:8080/btmcentral/sphere/ -l admin:passme