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:
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.
To start the SCSServer from the IBM Integration Toolkit:
In the Test Client you can:
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>