Issue assigning tags for SOAP API using API-ServiceManagement of the API-Gateway

Product/components used and version/fix level:

API Gateway 10.15 FIX10

Detailed explanation of the problem:

I used API apiGatewayServiceManagement provided by the API-Gateway to automate the virtualisation of my SOAP API by giving in input : WSDL Url, API Name, Maturity, Version, Tags, Description

A call to POST https://<my_api-gw_url>:port/rest/apigateway/apis partially work with this kind of input payload :

POST {{apim_api_url}}/apis
Authorization: Basic {{apim_api_token}}
Accept: application/json
Content-Type: application/json

{
  "apiName": "TEST_SOAP",
  "apiVersion": "1.0",
  "apiDescription": "SOAP API create from Gitlab Ci/Cd",
  "maturityState": "Beta",
  "type":"wsdl",
  "url": "{{soap_sampleService}}?WSDL",
  "apiDefinition": {
    "apiTags": [ "Tag_1", "Tag_2" ]
  }
}

Error messages / full error message screenshot / log file:

A get a HTTP/1.1 201 Created with API created details but tags are not defined.
I have to set it manually by editing de SOAP API via the administration WebSite

Question related to a free trial, or to a production (customer) instance?

How can I FIX this trouble ; I also try to set input { "apiDefinition" : { "tags": [ { "name":"Tag_1" } ] } } ; but it doesn’t work better
I don’t have any trouble for a REST API (tags are correctly assigned)

Here is the API POST .../apis response

HTTP/1.1 201 Created
Content-Type: application/json; charset=UTF-8
Connection: close
Content-Length: 9924

{
  "apiResponse": {
    "api": {
      "apiDefinition": {
        "wsdl": "<<<HERE IS THE WSDL DEFINITION>>>",
        "nativeUri": [
          "https://{{apim_host}}/ws/sample.ws.provider.sampleService.v1_0:sampleService_wsd/SampleService_Port"
        ],
        "serviceName": "sample.ws.provider.sampleService.v1_0.sampleService_wsd",
        "operationsInfo": [
          {
            "name": "ping",
            "namespace": "http://example.com/sample/ws/sampleService",
            "enabled": true,
            "bindings": [
              {
                "name": "SampleService_Binder",
                "type": "soap",
                "specifier": "",
                "inputMessage": "<ns:pingRequest xmlns:ns=\"http://example.com/sample/ws/sampleService/v1/ns\"/>",
                "outputMessage": "<ns:pingResponse xmlns:ns=\"http://example.com/sample/ws/sampleService/v1/ns\">string</ns:pingResponse>"
              }
            ],
            "defined": true,
            "soapAction": "ping",
            "isRESTInvokeEnabled": false,
            "restEnabledPath": {
              "post": {
                "consumes": [
                  "application/json",
                  "application/xml"
                ],
                "produces": [
                  "application/json",
                  "application/xml"
                ],
                "parameters": [],
                "responses": {
                  "200": {
                    "content": {
                      "application/json": {
                        "example": "{\"pingResponse\":\"string\"}"
                      },
                      "application/xml": {
                        "example": "<ns:pingResponse xmlns:ns=\"http://example.com/sample/ws/sampleService/v1/ns\">string</ns:pingResponse>"
                      }
                    }
                  }
                },
                "enabled": true,
                "requestBody": {
                  "content": {
                    "application/json": {
                      "example": "{\"pingRequest\":\"\"}"
                    },
                    "application/xml": {
                      "example": "<ns:pingRequest xmlns:ns=\"http://example.com/sample/ws/sampleService/v1/ns\"/>"
                    }
                  },
                  "required": false
                }
              },
              "parameters": [],
              "enabled": true,
              "name": "ping",
              "invokePath": "/ping"
            },
            "headers": []
          },
          {
            "name": "health",
            "namespace": "http://example.com/sample/ws/sampleService",
            "enabled": true,
            "bindings": [
              {
                "name": "SampleService_Binder",
                "type": "soap",
                "specifier": "",
                "inputMessage": "<ns:healthRequest xmlns:ns=\"http://example.com/sample/ws/sampleService/v1/ns\"/>",
                "outputMessage": "<ns:healthResponse xmlns:ns=\"http://example.com/sample/ws/sampleService/v1/ns\">\r\n  <composant>string</composant>\r\n  <serveur>string</serveur>\r\n  <estFonctionnel>false</estFonctionnel>\r\n  <duree>08:36:28</duree>\r\n  <!--Zero or more repetitions:-->\r\n  <services>\r\n    <nom>string</nom>\r\n    <estFonctionnel>true</estFonctionnel>\r\n    <message>string</message>\r\n    <duree>2014-06-09T17:15:04+02:00</duree>\r\n    <details>\r\n      <connectionString>string</connectionString>\r\n      <type>string</type>\r\n      <serveur>string</serveur>\r\n      <composant>string</composant>\r\n    </details>\r\n  </services>\r\n</ns:healthResponse>"
              }
            ],
            "defined": true,
            "soapAction": "health",
            "isRESTInvokeEnabled": false,
            "restEnabledPath": {
              "post": {
                "consumes": [
                  "application/json",
                  "application/xml"
                ],
                "produces": [
                  "application/json",
                  "application/xml"
                ],
                "parameters": [],
                "responses": {
                  "200": {
                    "content": {
                      "application/json": {
                        "example": "{\"healthResponse\":{\"composant\":\"string\",\"serveur\":\"string\",\"estFonctionnel\":false,\"duree\":\"08:36:28\",\"services\":{\"nom\":\"string\",\"estFonctionnel\":true,\"message\":\"string\",\"duree\":\"2014-06-09T17:15:04+02:00\",\"details\":{\"connectionString\":\"string\",\"type\":\"string\",\"serveur\":\"string\",\"composant\":\"string\"}}}}"
                      },
                      "application/xml": {
                        "example": "<ns:healthResponse xmlns:ns=\"http://example.com/sample/ws/sampleService/v1/ns\">\r\n  <composant>string</composant>\r\n  <serveur>string</serveur>\r\n  <estFonctionnel>false</estFonctionnel>\r\n  <duree>08:36:28</duree>\r\n  <!--Zero or more repetitions:-->\r\n  <services>\r\n    <nom>string</nom>\r\n    <estFonctionnel>true</estFonctionnel>\r\n    <message>string</message>\r\n    <duree>2014-06-09T17:15:04+02:00</duree>\r\n    <details>\r\n      <connectionString>string</connectionString>\r\n      <type>string</type>\r\n      <serveur>string</serveur>\r\n      <composant>string</composant>\r\n    </details>\r\n  </services>\r\n</ns:healthResponse>"
                      }
                    }
                  }
                },
                "enabled": true,
                "requestBody": {
                  "content": {
                    "application/json": {
                      "example": "{\"healthRequest\":\"\"}"
                    },
                    "application/xml": {
                      "example": "<ns:healthRequest xmlns:ns=\"http://example.com/sample/ws/sampleService/v1/ns\"/>"
                    }
                  },
                  "required": false
                }
              },
              "parameters": [],
              "enabled": true,
              "name": "health",
              "invokePath": "/health"
            },
            "headers": []
          }
        ],
        "type": "soap",
        "isRESTInvokeEnabled": false,
        "soapToRestConfigurations": {
          "useSchemaForTransformation": true,
          "removeRootElement": false,
          "useDefaultElements": false
        },
        "differentBindings": false
      },
      "nativeEndpoint": [
        {
          "passSecurityHeaders": true,
          "uri": "https://{{apim_host}}/ws/sample.ws.provider.sampleService.v1_0:sampleService_wsd/SampleService_Port",
          "connectionTimeoutDuration": 0,
          "alias": false
        }
      ],
      "apiName": "TEST_SOAP",
      "apiVersion": "1.0",
      "apiDescription": "SOAP API create from Gitlab Ci/Cd",
      "maturityState": "Beta",
      "isActive": false,
      "type": "SOAP",
      "owner": "apimCiCdUser",
      "policies": [
        "be4e4623-17ae-498e-a578-5d19a8ebc79e"
      ],
      "tracingEnabled": false,
      "scopes": [],
      "publishedPortals": [],
      "creationDate": "2023-10-23 14:06:56 GMT",
      "systemVersion": 1,
      "gatewayEndpoints": {},
      "id": "01c8aca7-eaae-42ce-996a-a7ac0ebdf26f"
    },
    "responseStatus": "SUCCESS"
  }
}

Hi @sbourgeois,
Have you referred the postman collection available on github page?

Regards
Vikash Sharma

Hi @Vikash_Sharma1,

Yes, I’m using this GitHub, unfortunatly, I think this GitHub is not complete. It contains already a lot of case ; but not the one I am looking for.

So to resolve my issue, and because of the API behavior, I need to change my script to do the folowing operation :

  1. First : Import the WSDL, from URL, using [POST] ../apis with all information into JSon paylaod
    → In this case, tags are not importing
  2. Second : Update the API using [PUT] .../apis/{{api.id}} using JSon response of th previous call as the request, and adding tags.
    → it’s very important to use the totaly response of the creation to this Update, overwise, all API information will be reset ; that why you have to reuse response and inject your updating data inside.

Using this API for automation are very boring ; and I need to do that into Linux Script (using jq and cUrl)

Here I need to make 2 API call, juste because the first call doesn’t matter the tags ; and I need to use the entire response because the Update API reset all APIs property you doesn’t put to the request.

hi @sbourgeois,
Can you please raise the Support Incident for same.

Regards
Vikash Sharma

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.