Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Adding IMS Transport via SOAVIRT API

jefftuckerbofa
jefftuckerbofa Posts: 234

I am making a PUT call to /v6/virtualAssets to set up the transports. I want to add IMS, however I am not certain what to include in the JSON for that. I currently have an "ims" element with a "port" and also a "workerCount' element. Can you share the appropriate JSON for IMS? Thanks JT

Comments

  • williammccusker
    williammccusker Posts: 672 ✭✭✭

    Hi,

    I am not sure what the IMS Transport is? Do you mean JMS or is IMS a custom listener? Based on the comment about a port and workerCount I am going to guess its custom listener. In the PUT payload there is a "custom" section, an example of it might be

     "custom" : {
                "className" : "com.company.example.IMSListener",
                "properties" : [
                    {
                        "name" : "port",
                        "value" : "111111"
                    },
                    {
                        "name" : "workerCount",
                        "value" : "1"
                    }
                ]
            }
    
  • jefftuckerbofa
    jefftuckerbofa Posts: 234

    Thank looks good to me. Thanks!

  • williammccusker
    williammccusker Posts: 672 ✭✭✭

    Glad I could help!

  • jefftuckerbofa
    jefftuckerbofa Posts: 234

    Hi Bill,

    I am using your JSON above as the format for adding the IMS listener to my deploy, however it does not seem to be working. I do see that the IMS custom transport is referenced in the response body JSON, however the port and numThreads values I pass in are not shown. Also, when I open the deployment on the server I can see that IMS is selected under custom transports, however again there are no values for the port and numThreads.

    JT

  • jefftuckerbofa
    jefftuckerbofa Posts: 234

    the property names I am using are port and numThreads
    tried both as String and numeric

  • jefftuckerbofa
    jefftuckerbofa Posts: 234

    and the 1.3 version of the IMS listener jar is in the system_jars folder on the server

  • OmarR
    OmarR Posts: 235 admin
    edited April 3

    Try making a GET - /virtualAssets/{id} call on a preconfigured asset to ensure you're using the correct classname for your custom listener.The following payload updated my deployment successfully. Give it a try.

    {
      "name": "ims_listener_test",
      "pvaLocation": {
        "id": "/VirtualAssets/ims_listener_test.pva"
      },
      "enabled": true,
      "description": "Testing IMS listener deployment using REST API",
      "transports": {
        "http": {
          "path": "/ims_listener_test"
        },
        "custom": {
          "className": "com.parasoft.virtualize.listener.ims.ImsMessageListener",
          "properties": [
            {
              "name": "numThreads",
              "value": "100"
            },
            {
              "name": "port",
              "value": "12345"
            }
          ]
        }
      }
    }
    
  • jefftuckerbofa
    jefftuckerbofa Posts: 234

    Thanks. Your post helped me fix the issue. I was missing the .ims portion of the package name.

    JT

  • jefftuckerbofa
    jefftuckerbofa Posts: 234

    Hey Bill,

    Is there a way to set up a test client in SOAtest that can be used to test an IMS-based virtual asset?

    Thanks,

    JT

  • williammccusker
    williammccusker Posts: 672 ✭✭✭

    Hi,

    Since it's a protocol that is not supported out of the box you would probably need to look into creating a custom transport, similar to how a custom listener was created for Virtualize. Then a client in SOAtest could use that custom transport to test.

    https://docs.parasoft.com/display/SVC20231/Adding+a+Custom+Transport