Share via


Running the Namespace Component Sample

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The Namespace Component sample application contains four receive location/send port pairs. Each pair represents a test. The following are the four tests:

  • Add to Pass-through. This test adds a namespace to an XML message document and writes the message directly to a file so that you can see the new namespace. The input file for this test is TEST_Add_to_PassThrough.0000.ns.xml. This test uses the NamespaceSampleReceivePipeline that contains an AddNamespace component.
  • Add to Remove. This test adds a namespace to an XML document message and then removes it. It then writes the message directly to a file. The input file for this test is TEST_ Add_to_Remove.0000.ns.xml. This test uses the NamespaceSampleReceivePipeline that contains an AddNamespace component and the NamespaceSampleSendPipeline that contains a RemoveNamespace component.
  • Pass-through to Remove. This test removes all namespaces from an XML document message and writes the message directly to a file so that you can confirm this. The input file for this test is TEST_PassThrough_to_Remove.0000.ns.xml. This test uses the NamespaceSampleSendPipeline that contains a RemoveNamespace component.
  • Add Via Extraction to Pass-through. This test extracts the OrderDetails element of an XML document message and writes a new message containing this element directly to a file. The input file for this test is TEST_AddViaExtraction_to_PassThrough.0000.ns.xml. This test uses the NamespaceSampleReceivePipeline that contains an AddNamespace component with the ExtractionNodeXPath property set to /CanonicalOrder/OrderDetails (any valid XPath that returns an element will suffice for this property).

The underlying receive locations within the sample application have file masks that are appropriate for each of the test types, and the related send ports filter on the receive port name. Therefore, to execute a test, you just drop the appropriately named message into the input folder. The sample application executes the test and drops the updated message into the output folder using a name appropriate for the current test, and including the Message ID.

This section contains the following topics: