Running the CORBA nodes sample

If you encounter any problems when you run the sample, see Resolving problems when running samples in the IBM Integration Bus documentation.

To run this client-server CORBA application on your computer, complete the following steps:

  1. Ensure that the naming service: tnameserv is running. If you have not started the naming service, start it.

    On Linux: To start tnameserv from a Linux command shell, enter:

      tnameserv -ORBInitialPort 2809
    

    On Windows: From an IBM Integration command console, enter:

      start tnameserv -ORBInitialPort 2809
    

    2809 is the port on which you want the name server to run and is the default value if -ORBInitialPort is omitted.

  2. Start the stock control system server: SCSServer.

    To start the SCSServer from the IBM Integration Toolkit:

  3. Run the client application.

    In the Test Client you can:

    1. If you have changed the port number from the default value of 2809, you must change this value on each of the CORBARequest nodes:
      1. Click the CORBARequest node, select Properties and go to the Basic tab.
      2. In the Naming services property, change the port number from the default value of 2809.
      3. Save the message flow, rebuild and re-deploy the broker archive (BAR) file to the integration node.
    2. Double-click one of the following flow tests to open it in the Test Client and click Send Message.
      • You can use the following request message to create a new product item:

        <StockControlManagementSystem.createNewStockItem>
        <sku>123</sku>
        <name>apple</name>
        <price>1.99</price>
        </StockControlManagementSystem.createNewStockItem>
        

        If the response is successful, you see the following message:

        <StockControlManagementSystem.createNewStockItemResponse>
        <sku>123</sku>
        </StockControlManagementSystem.createNewStockItemResponse>
        
      • You can use the following request message to increment the stock level of a product item by one:

        <StockControlManagementSystem.addStock>
        <sku>123</sku>
        <number>1</number>
        </StockControlManagementSystem.addStock>
        

        If the response is successful, you see the following message:

        <StockControlManagementSystem.addStockResponse>
        <quantity>1</quantity>
        </StockControlManagementSystem.addStockResponse>
        
      • You can use the following request message to retrieve details of a product item:

        <StockControlManagementSystem.getSKU>
        <name>apple</name>
        </StockControlManagementSystem.getSKU>
        

        If the response is successful, you see the following message:

        <ResponseData>
        <StockControlManagementSystem.getStockResponse>
        <_return>123</_return>
        </StockControlManagementSystem.getStockResponse>
        <StockControlManagementSystem.getPriceResponse>
        <_return>1.99E+0</_return>
        </StockControlManagementSystem.getPriceResponse>
        <StockControlManagementSystem.getStockLevelResponse>
        <_return>1</_return>
        </StockControlManagementSystem.getStockLevelResponse>
        </ResponseData>
        

    These responses are the collected set of responses from multiple CORBA requests to retrieve all of the details relating to a product item.

    If any of the above responses fail, the reason for the exception is displayed as below:

    <SKUNameAlreadyExist>
    <sku>123</sku>
    </SKUNameAlreadyExist>
    

Back to sample home