ActiveBPEL® Designer User’s Guide

Generating a Sample Data File

When you want to simulate process execution for a process with complex messages, you can generate sample data files for the messages. A sample data file is an XML file structured with message part elements or types that have been defined in the schema declared in the WSDL namespace. The following code is an example of a partial sample data file for a purchase order output message. Code similar to this example is automatically generated for you.

<purchaseOrders xmlns="http://samples.cxdn.com/po"
    xmlns:tns="http://samples.cxdn.com/po">
  <purchaseOrder tns:orderDate="2005-09-05">
    <shipTo tns:country="US">
      <name>Jay Lor Jr.</name>
      <street>100 My Street</street>
      <city>My City</city>
      <state>CT</state>
      <zip>06484</zip>
    </shipTo>
    ...
  </purchaseOrder>
</purchaseOrders>

To generate sample data:

  1. In the Web References view toolbar, click the down arrow, and select View Messages.
  2. In the Messages list, expand a message with a complex part, and select a message part for which you want to generate a valid sample XML data file.
  3. Right-click on the message part and select Generate Sample.
  4. In the XML Data Wizard, fill in your preferences for generating the sample data. For details, see Using the XML Data Wizard. Click Next.
  5. Name the file, and save it to a project location, as shown in the following example:

XML Data Wizard Save Results page

Note: You can generate multiple sample data files for the same message part. You can name the files uniquely, or you can use the same filename and store the files in different folders. ActiveBPEL keeps track of file locations when you add the files to Web References.