Preserve XML Namespace Prefixes

Override Service Virtualization default functionality to preserve original namespace prefixes in your messages.

When simulating SOAP and XML messages, Service Virtualization normalizes the namespace prefixes by default. This means that some messages are simulated using different XML namespace prefixes than the prefixes that were learned or imported from the real service.

This new lab feature instructs Service Virtualization to keep the original prefixes, and use them during simulation.

Supported for these messaging protocols: SOAP, XML

Preserve namespace prefixes

  1. Prerequisite: Enable the Enable Learning XML Namespace Prefixes lab feature. For details on Service Virtualization lab features, see Service Virtualization Labs.
  2. Enable the feature in your virtual service.

    In the Service Description Editor, under XML Schemas, select Learn XML Namespace Prefixes.

  3. Learn or import messages from the real service.

Result: During simulation, prefixes are maintained.

Disabling the feature

If you disable the feature, Service Virtualization continues to use the learned/imported prefixes. To remove that metadata, you need to relearn or reimport messages after disabling the feature.