## Service Creation Using User Input

A user can create a service here manually. By directly providing the inputs. Using user input, a user can create a service by directly providing the inputs.

A user can create a service here manually. By directly providing the inputs.

- Service Type: There are two types of services used:
  - HTTP(s)
  - Generic Socket
- Project: A project in service virtualization refers to a directory that consists of one or more inter-related virtualized services.
- Subproject: It refers to a smaller unit or subset of services within a project. It allows users to further categorize and organization virtualized services within the project.

## Service Type - HTTP(s)/Generic Socket

Enter the following fields to add the service:

- Service Name: It is a unique name of the service. (Common to both)
- URL: It is the URL of the service. (only in the case of HTTPs)
- Regular Expression: It allows the use of regular expression in URLs. (only in the case of HTTPs)
  - Ignore Case: It is used to ignore the case in the URL.
  - Complete Match: It is used to match the complete URL.
- Template Name: The template is the response identification. A service can have multiple templates which can be added once the service is created. (Common to both)
- Response Content (Common to both): The content type specifies the media type for the response. Here user can select the content type for the response from the drop-down list.If no Content-Type is specified, the default is none.
- Protobuf Settings (only in case of HTTPs)

  Here a user can directly upload the protofiles by enabling the checkbox for protobuf, and can provide a name for the protofile. If for Response, Content-Type is set to application/x-protobuf or x-application/protobuf then, only response will be converted into protobuf format. Example -Possible Content-Type header to convert body into protobuf are -Content-Type: application/x-protobuf OR Content-Type: x-application/protobuf . There are two sections: Request and Response. Provide the following details and click Save.

  1. Enable Protobuf: Select this check box to enable Protobuf.
  2. Upload Proto File:Select the Proto file by using the Choose button or paste the file content in the body section.
  3. Request Proto file: To get the content in encoded format as passed in the request.
  4. Response Proto fil: To get the response in encoded format from the server.
  5. Proto File Name: Provide the name of the proto file.
  6. Message Type: This contains the schema of proto file. This displays the parsed message types from the uploaded proto file. If the content of the proto file is modified, the ‘Message Type’ drop-down is automatically be refreshed.

  Note: All the fields in ‘Request’ and ‘Response’ sections are mandatory if enabled.When you hit a service from Service Virtualization, the data is sent in the encoded format.

- Request (Common to both)
  - A request is a message consisting of a header and payload (if any) for which a service can be created.
  - Users can also select the requested file by clicking the Choose button.
- Response Template (Common to both): A response template is the response of the service. This can be modified using different types of parameters. Users can select a file where a sample response is stored by clicking on the Choose button.
- Format/Beautify (Common to both)
  - It is used for formatting or beautifying the sample requests and response templates in a well-structured format.
  - The sample requests and response templates can be in the following types:
    - Text
    - CSS
    - HTML
    - JavaScript
    - XML
    - JSON
- SSL Port: SSL (Secure Sockets Layer) is a security protocol that provides encrypted communication over a computer network. Fill in the HTTP port. (only in case of generic socket)
- Non- SSL port: Non-SSL ports refer to the standard ports that are used for communication without encryption. (only in case of generic socket)