Start of Content Area

Background documentation Testing Web Services  Locate the document in its SAP Library structure

Use

You can consume Web services 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.

More information: Consuming a Web Service  

Logical Ports

No logical port is generated during the generation of proxy classes in current Releases. Instead, the parts that describe the target system and the service addressing parts are stored separately. A logical port is then generated at execution.

You can create and maintain logical ports in transaction SOAMANAGER.

More information: Logical Ports for Web Services  

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

Generating Proxy Classes

...

       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 Continue.

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

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

       8.      Choose Generate Proxy Class.

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

   10.      Choose Continue.

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

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

   13.      Choose Continue.

Using an Existing Proxy Class

   14.      Choose Pattern.

   15.      In the Group field, choose Enterprise Services.

   16.      In the Command field, choose WEBSERVICE.

   17.      Choose Continue.

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

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

   20.      Choose Continue.

Regenerating Proxy Classes

If a Web service changes, you will need to regenerate the proxy class.

...

       1.      Display the command interface of the web service.

       2.      Choose This graphic is explained in the accompanying text (regenerate).

The system generates a new proxy class with a new name and copies these into the command interface.

       3.      Assign a transport request if necessary.

       4.      After you have regenerated the proxy class, restart eCATT.

 

 

End of Content Area