To use the Test Client, you must create or edit
a test message to send to your message flow.
About this task
A number of editors are available in the Test Client for creating a test message.
The most appropriate editor to use depends upon the type of test message
you want to send to your message flow.
- If the input node that you want to send the message to for the
test expects an XML message, and the message flow is associated with
a message definition, the Edit as XML structure editor
is available.
- If you want to send an XML message, but do not have a message
definition defined, or you want to create a test message that is not
in XML format, you can use the Edit as text editor.
- If you want to use an existing test message from a workspace resource
or file system file, you can use the Import from external
file editor.
- Alternatively you can import an existing test message into the Edit
as text editor, or take the generated source from the Edit
as XML structure editor and paste it into the Edit
as text editor.
The Test Client provides
limited support for the generation of XSD and WSDL test messages.
If the Test Client cannot generate
the test message automatically, you can create the test message by
using either the Edit as text or Import from external file method described
in this topic.
Select from the following options
to create and edit a test message:
Procedure
- Edit as XML structure:
- In the Events tab of
the Test Client, select Edit
as XML structure from the Body list.
- Edit the entries in the Value column
for each field to change the content of the test message.
- Right-click the fields in the Edit
as XML structure editor to see additional options for
defining the content of the test message.
These options
include adding message parts and elements, for example if your message
has repeating fields.
- You can save your file with the updated test message
by clicking .
- To view and copy the generated test message, click Show
Generated Source.
- Edit as text:
- In the Events tab of
the Test Client, select Edit
as text from the Body list.
- Enter the text content for your test message.
You can copy content into the editor from another source by right-clicking
in the editor and selecting Paste, or import
content from an existing test message by clicking Import
Source.
- You can save your file with the updated test message
by clicking .
- Import from external file:
- In the Events tab of the Test Client:
- If the input node expects an XML message, select Import
from external file from the Body list.
- If the input node does not expect an XML message, select Import
from external file (Binary and Text) from the Body list.
- Select from the following options to locate the file
containing your test message:
- Workspace resource
- Click Workspace. You can then locate your
existing test message from your workspace.
- Click OK to use the selected resource.
- Click Edit to open the default editor associated
with the resource.
- File system file
- Click File system. You can then locate
your existing test message from your file system.
- Click Open to use the selected file.
- You can save your file with the updated test message
file details by clicking .
What to do next
Ensure that
you have selected the correct input node to send the test message
to in your message flow. Click Send Message to
send your test message to the selected input node. If this is the
first time you have sent a message using this Test Client file, the Deployment
Location wizard opens. See Selecting the deployment location for the message flow.