Testing Web Services

Use

You can consume Web services (document style, not rpc) in your test scripts – that is, you can call a Web service using the WEBSERVICE command. To test a Web service you require a proxy class in the eCATT system. This class can already exist in the eCATT system or you can generate it from a WSDL file. Inside a package, only one proxy class for each Web service is allowed.

Logical Ports

A default logical port (ECATTDEFAULT) is automatically generated. You can create and maintain logical ports in transaction LPCONFIG.

Target Systems

The target system for a WEBSERVICE command uses an HTTP destination (type G for Java, type H for ABAP).

The use of the target system is to temporarily override the URL or HTTP destination in the logical port with the URL specified in the HTTP destination of the target system (in fact, eCATT makes a temporary copy of the logical port, and it is this copy that is used). A path suffix is necessary either in the destination, the logical port, or the command interface.

Only when using a target system does a path suffix in the command interface have an effect. It overrides other path suffixes.

Procedure

Generation or Re-Generating a Proxy Class

...

       1.      Choose Pattern.

       2.      In the Group field, choose Enterprise Services.

       3.      In the Command field, choose WEBSERVICE.

       4.      Assign a package and, if required, a transport request.

You should normally assign the generated objects to the same package as the test script. This will help ensure that they will be transported with the script that calls them.

       5.      Choose Enter.

       6.      Enter the URL for the WSDL web service definition.

You can use the F4 help to call up the WSIL browser to search for Web services on the ABAP stack of any system.

       7.      Choose Generate Proxy Class.

       8.      Select the PortType from the offered list (if several PortTypes exist).

       9.      Choose Enter.

If the proxy class already exists, it is re-generated.

   10.      In the ABAP Proxy Method field, select a method from the dropdown list.

   11.      Choose Enter.

Using an Existing Proxy Class

       1.      Choose Pattern.

       2.      In the Group field, choose Enterprise Services.

       3.      In the Command field, choose WEBSERVICE.

       4.      Choose Enter.

       5.      In the ABAP Proxy Class field, enter the class.

       6.      In the ABAP Proxy Method field, select a method from the dropdown list

       7.      Choose Enter.