官术网_书友最值得收藏!

Testing the proxy service through the OSB console

With the OSB configuration deployed successfully to our OSB server, it's time to test it. This recipe will show the most basic way to test, using the OSB console. This is good enough for some initial test but in the long term something more repeatable is necessary. One alternative option is using soapUI, which will be covered in the next recipe.

Getting ready

Navigate to the OSB console and login as the Administrator (that is, weblogic).

How to do it...

In the OSB console, perform the following steps:

  1. Click on the menu item Project Explorer on the left-hand side of the OSB console.
  2. In the project tree, click on basic-osb-service and in the details section on the right, the project folder tree will be shown.
  3. Click on the proxy link.
  4. The proxy service Customer Service should be displayed in the details section (might have to scroll down to see it):
    How to do it...
  5. Click on the bug symbol in the Actions section (highlighted in red in the preceding screenshot) to open the test window for the Customer Service proxy service.
  6. In the Proxy Service Testing window, make sure you select the right operation in the Available Operations drop-down list. We want to test the RetrieveCustomerByCriteria operation.
  7. Change the Payload field as shown in the following screenshot:
    How to do it...
  8. Click on the Execute button to run the test. The test results are returned after a while in the same window:
    How to do it...
  9. Check that the right customer (with ID = 1) information is being returned by the OSB service.
  10. Scroll down in the window to see the Invocation Trace section. This will show steps that the OSB proxy service has executed and values of the variables during execution:
    How to do it...

How it works...

Due to the fact that the interface of the proxy service is clearly defined through the WSDL, the OSB console is capable of showing us a sample test message in the Payload field. If we have a proxy service without a WSDL, then testing that service will still be possible through that window, but there will no longer be a sample message shown, as the OSB console does not know about the structure.

The testing capabilities offered by the OSB console are good for some initial tests or if the execution trace is of value, possibly for debugging if using the graphical debugger is not an option. The limitation of the OSB console for testing is clearly that there is no way to persist a test case to be able to run it again later. By that it's also not possible to automate and repeat testing, for example, to start tests inside a nightly build. For that, soapUI, which will be shown in the next recipe, is much better suited.

See also

An alternative way for testing proxy services can be found in the next recipe Testing the proxy service through soapUI.

主站蜘蛛池模板: 离岛区| 昭苏县| 灌南县| 博罗县| 南郑县| 区。| 道真| 克什克腾旗| 德安县| 成武县| 武宣县| 太湖县| 吉林市| 泽州县| 庆阳市| 叙永县| 新龙县| 巴里| 慈溪市| 阜新| 深水埗区| 浦北县| 舟山市| 灵武市| 明溪县| 神木县| 七台河市| 福泉市| 清水河县| 英德市| 长丰县| 延安市| 萨嘎县| 惠安县| 龙游县| 宣威市| 鹿泉市| 陵川县| 孝义市| 东台市| 德格县|