Loading…
Loading…
Describes how the platform generates new services, REST operations, and backend profiles from imported WSDL artifacts, including automatic route inference
The WSDL Generation repository provides the core logic for creating and updating services from previously imported Web Services Description Language (WSDL) artifacts. It automates the translation of a SOAP-based contract into a RESTful service definition within the platform.
This component solves two primary use cases:
The process is initiated with the ID of a WSDL artifact and service metadata. It results in new records being created in the platform's database for the service, its version, and its operations (s2r_service, s2r_service_version, s2r_operation). The output is a summary record containing the IDs of the created entities and any validation warnings.
When you generate a new service from a WSDL artifact, the system performs a series of steps to create all the necessary platform resources.
The generation process is transactional and follows a well-defined sequence.
flowchart TD
subgraph "API Publisher Inputs"
A[WSDL Artifact ID]
B[Service Metadata <br/>(Key, Name, Environment)]
end
subgraph "Service Generation"
C[1. Start Generation]
D{2. Service Key Available?}
E[3. Validate WSDL Artifact]
F[4. Run Contract Validation <br/>(generates non-blocking warnings)]
G[5. Create Service & Version Shells]
H[6. Generate Operations & REST Routes]
I{7. Backend Suggestion in WSDL?}
J[8. Create Default Backend Profile]
end
subgraph "Result"
K[Success: New Service Created]
L[Failure: Exception Thrown]
end
A --> C
B --> C
C --> D
D -- Yes --> E
D -- No --> L
E --> F
F --> G
G --> H
H --> I
I -- Yes --> J
J --> K
I -- No --> KserviceKey is not already in use within the specified environment for your tenant. It also checks that the direction parameter is one of PUBLISH, CONSUME, or GATEWAY. If no direction is provided, it defaults to PUBLISH.WARNING
Non-Blocking Validation: If validation failures are found, the service generation process does not stop. Instead, the failures are logged as warnings (with code S2R-ADM-0612) and returned in the contractWarnings field of the GeneratedServiceResult. This allows you to create the service and address the contract issues later.
s2r_service with a status of draft. A corresponding initial version record (version 1) is inserted into s2r_service_version, linking the service to the source wsdl_artifact_id.operation_key is generated from the SOAP operation name. If names conflict, a numeric suffix is added (e.g., my-op, my-op-2).WsdlRestRouteHeuristics component infers a unique REST method and path for the operation, avoiding conflicts with other operations in the same service.s2r_operation table. This record includes the inferred REST route, SOAP metadata (soap_operation_name, soap_action), and JSON schemas.binding_style and any soap:header or soap:headerfault definitions are copied from the WSDL artifact to the s2r_operation record.enabled=true, debug_enabled=false, and default values for timeout_ms and retry_count derived from system settings.WsdlBackendSuggestionRecord), the system automatically creates a default backend profile.
s2r_backend_profile named default.endpoint_url, soap_namespace, and soap_version are set from the suggestion.auth_type='none' and mtls_enabled=false. You must configure credentials manually after creation.default_backend_profile_id for the service.Service generation is invoked via internal Java methods.
generateServiceFromArtifactCreates a new service with a specific serviceKey.
| Parameter | Type | Description |
|---|---|---|
artifactId | UUID | The ID of the WSDL import artifact to generate the service from. |
serviceKey | String | The unique key for the new service within the environment. |
serviceName | String | The human-readable name for the new service. |
environment | String | The environment where the service will be created. |
direction | String | The service direction: PUBLISH, CONSUME, or GATEWAY. Defaults to PUBLISH if not provided. |
actor | String | The identifier of the user or system performing the action. |
Returns: GeneratedServiceResult
generateServiceFromArtifactAutoCreates a new service, automatically determining an available serviceKey. If the baseServiceKey is taken, it appends a numeric suffix (e.g., -2, -3) until an available key is found.
| Parameter | Type | Description |
|---|---|---|
artifactId | UUID | The ID of the WSDL import artifact. |
baseServiceKey | String | The preferred service key. Will be used as a base if not available. |
serviceName | String | The human-readable name for the new service. |
environment | String | The environment where the service will be created. |
direction | String | The service direction: PUBLISH, CONSUME, or GATEWAY. Defaults to PUBLISH. |
actor | String | The identifier of the user or system performing the action. |
Returns: GeneratedServiceResult
GeneratedServiceResultThis object contains details about the newly created service.
| Field | Type | Description |
|---|---|---|
serviceId | UUID | The ID of the newly created s2r_service record. |
versionId | UUID | The ID of the initial s2r_service_version record. |
serviceKey | String | The final, resolved service key. |
serviceName | String | The name of the service. |
environment | String | The environment of the service. |
backendProfileId | UUID | The ID of the auto-configured backend profile, or null if none was created. |
endpointUrl | String | The endpoint URL of the auto-configured backend, or null. |
backendAutoConfigured | boolean | true if a backend profile was automatically configured. |
generated | List<GeneratedOperationRecord> | A list of all operations created for the service. |
contractWarnings | Map<String, Object> | A map containing details of any contract validation failures, or null if there were none. |
This feature allows you to update an existing WSDL-based service by creating a new draft version from a more recent WSDL artifact.
The process identifies changes between the current service version and a new WSDL, creating a new draft that preserves existing configurations where possible.
flowchart TD
subgraph "API Publisher Inputs"
A[Existing Service ID]
B[Source Version ID]
end
subgraph "Replacement Draft Generation"
C[1. Start Draft Generation]
D{2. Draft Already Exists?}
E[3. Find Newer Comparable WSDL Artifact]
F[4. Plan Changes <br/>(Preserved, New, Removed Ops)]
G[5. Run Contract Validation on New WSDL <br/>(generates non-blocking warnings)]
H[6. Create New Draft Service Version]
I[7. Create Operations from Plan]
J{8. Service has no Backend Profile?}
K[9. Create Default Backend Profile]
end
subgraph "Result"
L[Success: New Draft Version Created]
M[Failure: Exception Thrown]
end
A --> C
B --> C
C --> D
D -- Yes --> M
D -- No --> E
E --> F
F --> G
G --> H
H --> I
I --> J
J -- Yes --> K
K --> L
J -- No --> LsourceVersionId and verifies that no other draft version already exists for the service. It also confirms the source version is linked to a WSDL artifact.sourceVersionId and then searches for the latest "comparable" WSDL artifact that is newer. A comparable artifact has the same sourceName and targetNamespace. If no newer comparable artifact is found, the process fails.WsdlReplacementDraftPlanner is invoked. It compares the operations in the source version with those in the new WSDL artifact. It produces a plan that categorizes operations as preserved, new, or removed, and carries over settings (REST route, timeout, etc.) for preserved operations.s2r_service_version record is created with status='draft' and is_active=false. It is assigned the next available version number for the service (e.g., 2, 3, etc.) and linked to the new WSDL artifact ID.s2r_operation records for the new draft version based on the replacement plan. Settings for preserved operations are copied from the previous version, while new operations get default settings.generateReplacementDraftFromLatestComparableCreates a new draft version for an existing service.
| Parameter | Type | Description |
|---|---|---|
serviceId | UUID | The ID of the service to update. |
sourceVersionId | UUID | The ID of the existing service version to use as the base for comparison. |
actor | String | The identifier of the user or system performing the action. |
Returns: WsdlReplacementDraftResult
WsdlReplacementDraftResultThis object summarizes the outcome of the draft creation.
| Field | Type | Description |
|---|---|---|
serviceId | UUID | The ID of the service being updated. |
newVersionId | UUID | The ID of the newly created draft s2r_service_version. |
newVersionNo | int | The version number of the new draft. |
sourceVersionId | UUID | The ID of the version this draft was based on. |
sourceArtifactId | UUID | The ID of the WSDL artifact from the source version. |
latestArtifactId | UUID | The ID of the new WSDL artifact used to create the draft. |
generatedOperationCount | int | Total number of operations in the new draft version. |
preservedOperationCount | int | Number of operations carried over from the source version. |
newOperationCount | int | Number of new operations added in this draft. |
removedOperationCount | int | Number of operations from the source version that are not in this draft. |
backendProfileId | UUID | The ID of the auto-configured backend profile, or null. |
endpointUrl | String | The endpoint URL of the auto-configured backend, or null. |
backendAutoConfigured | boolean | true if a backend profile was automatically configured. |
contractWarnings | Map<String, Object> | Details of any contract validation failures, or null. |
Operation generation relies on system-wide settings for default timeout and retry policies. These are configured in the SystemSettingRepository.
| Setting | Type | Default | Valid Range | Description |
|---|---|---|---|---|
default_timeout_ms | integer | 1000 | 1-60000 | The default operation timeout in milliseconds. Values outside the valid range are ignored, and the fallback default is used. |
default_retry_count | integer | 2 | 0-10 | The default number of retries for an operation. Values outside the valid range are ignored, and the fallback default is used. |
| Exception / Condition | Trigger | Description |
|---|---|---|
IllegalArgumentException | The provided serviceKey already exists in the target environment. | The error message is Service key '<key>' already exists in environment '<env>'. Choose another key or use Create Draft With Suggested Settings. Service keys must be unique per environment within a tenant. |
IllegalArgumentException | The direction parameter is not PUBLISH, CONSUME, or GATEWAY. | The service direction must be one of the canonical values. |
IllegalArgumentException | The WSDL artifact specified by artifactId contains no operations. | A service cannot be generated from an empty WSDL. |
IllegalArgumentException | No WSDL artifact or service version can be found for the provided ID. | The specified UUID does not correspond to an existing entity. |
IllegalArgumentException | No newer, comparable WSDL artifact is available for a replacement draft. | The system could not find a WSDL with the same sourceName and targetNamespace that was imported after the source version's artifact. |
IllegalStateException | Attempting to create a replacement draft for a service that already has an active draft version. | A service can only have one draft version at a time. The existing draft must be activated or deleted first. |
contractWarnings in result | An example value in a WSDL schema does not match its own constraints. | This is a non-blocking warning (S2R-ADM-0612). The service is created, but the schema may have issues that need to be corrected. The contractWarnings map in the result payload contains structured details of the violations. |