Skip to end of metadata
Go to start of metadata

Contents


 

Web Service Testing Using the J2EE Server Web Service Navigator

Motivation

At a certain point in time during the develoment of a Web service provider application endpoint, you want to test its functionality not only in a local development environment (e.g. SE80), but also, if the Web service call as a whole can be successfully performed. For this purpose, you want to make a call from a Web service consumer to the Web service provider by exchange data over a previously established Web service connection.
One test option offered by the ABAP backend is to use SAP's Java Web Service Navigator application.

There are additional options to perform such a Web service test call.
In the SAP ABAP system itself, you can generate a consumer proxy (based on the porttype WSDL document of the Web service provider you want to test) and use a logical port you have presiously generated in the SOAMANAGER transaction.
In addition, several non-SAP Web service test tools exist to perform a Web service call to an ABAP Web service provider (e.g. SoapUI).

Concept

The Web service call test using SAP's Java Web Service Navigator application is based on the fact, that Web service calls in the SAP Java environment are based during Web service runtime on an initial retrieval of the WSDL document before the actual Web service call.
Any additional required information, e.g. credentials, are assigned via some Java server local configuration to this Web service provider. The completed, final Web service provider access configuration gets cached and until invalidation of the Web service cache, this setup remains in the Java Web service engine valid in a Web service related J2EE engine cache.
The processing of the Java Web Service Navigator makes use out of this processing model, i.e. you start the navigator application via an access URL, specify the WSDL-URL of the Web service provider you want to call, specify credentials for accessing the WSDL document, fill in the required provider information on a dynamically generated input screen, execute the Web service call and get the result.
To get via the ABAP's SOAMANAGER transaction into this processing loop, you just specify the navigator application's protocol, host and port information.

Prerequisites

To access the Java Web Service Navigator application, you have to have an SAP Java stack installed in your landscape and a Java stack user account.

It is not required, that the Java stack you intent to use is part of a dual stack (ABAP and Java) SAP-installation, but it could be any SAP J2EE engine which is accessible via an URL in your system landscape.


For calling an ABAP Web service provider, you have to generate first a valid provider configuration on the ABAP backend. Only with such a configuration, it is possible, that a WSDL can be generated and a Web service call can be performed.

Constraints

The access to the Java Web Service Navigator cannot make use of a network proxy setting, i.e. it is assumed, that your ABAP Web service test is done in a networking environment, were a URL and user/password credentials are sufficient to access the Java test environment.

Procedure

To setup the SAP J2EE Java Web Service navigator access from the SOAMANAGER transaction, you perform the following steps.

  1. Start transaction SOAMANAGRER
  2. Navigate to the Web Service Navigator tab
    From the main view of the SOAMANAGER transaction, you select the Technical Administration tab, choose SAP Client Settings and the Web Service Navigator tab. You get this input view for accessing the SAP J2EE engine.

  3. Enter the Navigator's Access Information

    You enter or select the following information:

    • Hostname: Enter the name of the host, where the SAP J2EE Web engine you want to use, is running
    • Portnumber: Enter the port number of the SAP J2EE engine
    • Protocol: Specify the HTTP protocol you want to use, i.e. http or https
    • Check, if an old J2EE version gets used.
      This option should only be checked, if the J2EE eninge you intend to use, has the Netweaver release 6.40 or some early Support Package (SP) level in release 7.00. Do not check this box if it is not really required, i.e. try first with this option left unchecked.

    You do not have to enter the Web Service Navigators access path, because that path depends on the Netweaver Release of the Java engine (you only have to specify for old J2EE engines, if required, but nothing more) and on the ABAP provider binding you want to access.

  4. Save the navigator settings
    By pressing the Save button you persist the entered access values. Only in this case, they can be used from the ABAP Web service provider configuration view for testing.
    You can always come back to this screen and change the setting to change the access to the Web Service Navigator application, e.g. to switch to a different J2EE engine.

    Using the Java Web Service Navigator for testing an ABAP Web Service does no leave any data footprint on the J2EE engine.

  5. Using the Web Service Navigator
    Currently you can use the Java Web Service Navigator application from the SOAMANAGER's Web Service Configuration view only.
    To start that view, you use the SOAMANAGER's tab Service Administration, link Web Service Configuration, enter a service definition name in the field labelled Search Pattern, hit the Go button, select one of the found service definitions and press button Apply Selection.
    You end up in the following view (in this example, we used the service definition named SRT_TEST_PROVIDER).


    In the Overview tab, you have a link labelled Open Web Service Navigator for selected binding. This link triggers the startup of a new browser instance using the URL based on the Java Web Service Navigator information you have set up in the previous step.
    The used Web service provider binding to be tested by the navigator application is the one which is selected by the drop down menu in this Overview tab.

  6. Starting the Web Service Navigator Application
    After you have selected the binding you want to test and selected the link Open Web Service Navigator for selcted binding, a new browser window gets started which shows you the available operations of your Web service provider.

    On startup of the Java Web Service navigator application, you get prompted for entering a user and password to access the J2EE engine's application. You have to specify a Java stack user that is authorized to access the Web Service navigator application. This user account may be different from the user account you are using to login to the ABAP stack. Ask your J2EE engine system administrator to get a suitable user and password for the Web Service Navigator access.
    After you have entered successfully the J2EE engine user, you get prompted a second time for specifying a user and password. This time, you have to specify a user for the connect back to the ABAP system to get the WSDL and to perform the Web Service call itself later on.


    In this example, we have only have one operation in the ABAP Web Service provider. The Web Service navigator shows the available operations on the ABAP backend in this view.

  7. Performing the Web service call via the Web Service Navigator Application
    From the Web service's operations overview view, you select one operation and press the Next Button. You end up in this view.


    Now you perform the actual Web service call by pressing the button Invoke.

  8. Analysing the Result of the Web service call
    Depending on the processing time in the ABAP backend, you get a Web Service response back and the result is shown.
    There are different ways you can look at the result:

    • as a tree view,
    • as XML content or
    • as the http message which was received for the Web Service call (including the http header information).

    The different options for displaying the result of the Web service call depends on the release of your SAP J2EE eninge. The example here is taken from the Netweaver Release 7.32.


    This is the result shown as tree view.


    This is the result shown as http message including its http headers.


    This is the result shown as XML document.

Result

If you have called the ABAP Web service successfully and the result displayed in the Java Web Service Navigator application fullfills your requirements, your Web Service call to the ABAP backend testing was successful. 

Note: For table types in the response Web Service Navigator displays up to 50 rows only. If you wish to display the complete response, test with a real SOAP Client, eg. ABAP Consumer Proxy or 3rd party tools, like SOAP UI.

More Information

SAP Note 1318883 - Introduction of new authorizations in Web Service Framework

  • No labels