Edit a Service Description

This task describes how to edit a service description. This includes service editing and URI space editing.

Note: To learn more about service descriptions, see Service Descriptions.

Open a service description

In the Virtual Service Editor, under Service Description, click Edit. For user interface details, see Service Description Editor.

Back to top

Edit metadata

You can add, delete, enable, disable, and edit metadata.

In the Service Description Editor, under Request Metadata or Response Metadata, click Edit. For user interface details, see the Edit Metadata Dialog Box.

Response metadata overrides

Certain protocols allow you to specify overrides in order to fine-tune the behavior of the virtual service.

For the JMS, and WebSphere MQ protocols, you can override ResponseDelay and ResponseDestination.

To add an override:

  1. Open the the Edit Metadata Dialog Box.

  2. Select the desired override item and click Enable.

  3. Set a value for ResponseDestination using the Data Model Editor.

Back to top

Manage XML schemas

In the Service Description Editor, under XML Schemas, select an option to add, edit, or remove XML schemas. For user interface details, see Service Description Editor.

Back to top

Add or remove an operation

You can add operations to your service.

In the Service Description Editor, in the bottom left of the Operations pane, click Add Operation. Select input and output message types. You must assign each operation a unique input message type.

SAP services: For a SAP service, the Add Operation dialog box enables you to import RFC functions or IDoc operations from a SAP server. For more details on SAP IDoc communication, see Virtualize SAP IDoc Communication.

Back to top

Add, delete, or rename a URI space

Add: You can create additional URI spaces for data in your REST virtual services.

In the Service Description Editor, in the bottom left of the Operations pane, click Add URI Space.

Alternatively, right-click in the Operations pane and select Add URI Space.

Enter details for the new URI space.

  • Segments are separated with a '/' and the wildcard characters * and ** are used for several characters or segments. For instructions on defining a URI space, see Define the URI Space.
  • If the new URI space contains a variable, the variable is converted to *. In the Add URI Space dialog box, the Normalized URI field is displayed, showing the adjusted URI space name.

    Example:  

    New URI Space: my/{id}

    Normalized (adjusted) URI: my/*

  • Caution: If a URI Space is in conflict with an existing URI Space and the new URI Space is more specific, the conflicting URI Space is split to several new URI Spaces and data from all associated rules are moved to these new URI Spaces.

Delete: To delete a URI space, in the left pane of the Service Description Editor, select the URI space and click Delete URI Space.

Alternatively, right-click a URI space and select Delete URI Space.

Select an option:

  • Delete the URI space, including all data
  • Move data into another existing URI space. This option enables you to add and delete URI spaces at any time without losing any data.

Rename: To rename a URI space, right-click the URI space name and select Rename URI Space.

  • You can choose to rename the URI space only, or the URI space and associated URI paths in existing data rows in the data model.
  • Review the examples displayed in the dialog box to make sure that the planned changes meet your expectations.

Back to top

Add or remove data formats

Data formats can be added and removed from a URI space as either request or response data formats.

  1. In the Service Description Editor, in the operations pane on the left side, select a URI space.
  2. Under Data Formats > Request Data Formats or Response Data Formats, click Add.

For user interface details, see Add Data Format Dialog Box.

Back to top

Define session identifiers

To simulate a stateful service, in which the order of requests can impact the responses that are returned, you can configure the virtual service to create separate simulation sessions. For more information, see Stateful simulation.

To enable stateful simulation, set session IDs to identify client requests that originate from the same source.

  1. Prerequisite: Service Virtualization must have information on the message structure that the client uses. The structure of request/response messages is stored in the service description. You provide this information by doing one of the following:

    • Placing the virtual service in Learning mode to record real service behavior. For example, for a REST service.
    • Importing a service description document, such as when creating a SOAP service using an imported .wsdl service description document.
    • Importing messages into the virtual service's data model.
  2. In the Service Description Editor, under Session IDs Definition, click Edit.
  3. In the wizard pages that open, specify values for session identifiers, and click Finish. For user interface details, see Session ID Definition Wizard.
  4. Learn data again. Service Virtualization uses the session IDs to create different tracks based on the learned data, and uses the tracks to create different sessions during simulation.

Back to top

Hide data

Configure data masking to protect sensitive data. Data recorded during Learning is masked and cannot be viewed in the data model.

Do one of the following:

  • In the Service Description Editor, under Data Masking, view the data masking configuration for your virtual service. To configure data masking, click Edit.
  • In the Data Model Editor, right-click a column header and select Mask.

For user interface details, see Data Masking Dialog Box.

Back to top

Update a SOAP or Swagger service description

You may need to update a service description after a virtual service is created. A service commonly evolves over time, along with its service description document, requiring an update of the virtual service.

You can update the service description in the following ways:

Automatically:

During Learning, Service Virtualization updates the service description automatically, based on the data received.

Manually:

  1. In the Virtual Service Editor, under Service Descriptions, click Update From File.
  2. In the Update Service Description dialog box, enter the path or URL, or browse to enter a new file.

Back to top

Embedded XML Payload

Some services embed XML in parent XML by putting it in the CDATA section, or by XML escaping reserved characters. The problem with such embedded XML is that it is not structured in the data model, making it difficult to work with. If you want to structure this embedded XML, you must enable it manually.

To enable structuring of embedded XML:

  1. In the Service Description Editor, locate the Embedded XML Payload section.
  2. Click Add and select the tag that contains the embedded XML.

Caution: Any recorded or imported data already contained in the XML tag selected for structuring is deleted.

This feature is not available for SOAP based protocols.

Back to top