Skip to end of metadata
Go to start of metadata

Part 1:

For pictured but different descritption see the following article.

1. Navigate to SDN ES Workplace homepage

2. Click the link Enterprise Service Index.

3. In the browser window insert the name of the Enterprise Service: Find Customer by Address into the field Search and click Search in Enterprise Service Index.

4. In the browser window you get the result of the search. Click the link Find Customer by Address.
5. Now you can get detailed information about the Enterprise Service.
6. To open the WSDL file click the link on Related Web Service Definition.
7. Logon with your user.

8 Copy the link to your clipboard. Otionally you may save the WSDL locally in your file system. Eclipse based NetWeaver Developer Studio NWDS can handle both ways.

Part 2: Test the WSDL

1. Open theES Workplace in your Browser and click on Web Service Navigator.

2. Enter the WSDL, click next and logon with your credentials.

3. Click on "Test" in the navigation pane.

4. You see the Request Test Page for the wsdl:portType name="CustomerSimpleByNameAndAddressQueryResponse_In"

5. Enter e.g. "Julia" into xsd:element name="FirstLineName" and click "Send" button.

6. You will receive a Response list of customers. Look carefully at the nested structure of the Web Service reuest and response. We will need it for programming in the next part.

Part 3: Creating a java proxy in WEB 2.5 Project


This procedure enables you to generate a standalone Web Service proxy for consuming a Web Service using the Web Service Client wizard.

Creating a Web 2.5 project


1. Choose File -> New -> Project.

2. In the pop-up window choose Web --> Web 2.5 Project and click Next.
3. Enter the project name: ECCCustomerWEB and choose add to ECCCustomerEAR.
4. Choose Finish.

As a Result a new Web Project (for Java EE 5) is created.

5. Create a new Web Service Client. Choose File -> New -> Other --> Web Service Client.

6. In the popup wizard enter the WSDL-URL and choose "Deploy Client" in the slider on the left (however you may choose whatever you like, it has no influence in this project type.

7. Choose "SAP NetWeaver" as Web Service runtime instead of "Apache Axis". This is the tooling supporting the newer JAX-WS 2.0 specification. Selecting AXIS will require to deploy the AXIS runtime on the client engine, as well as AXIS 1.x generates uncompilable code for the "SAP Global datatypes" due to a bug. You will need them for the rather complex business data types.

8. Choose finish, a Java Proxy is generated.

9. This Java Proxy has a known bug. Programm the service implementation manually:


* Service implementation of

Unknown macro: {CustomerSimpleByNameAndAddressQueryResponse_InService}

(generated by SAP WSDL to Java generator).
*/ = "CustomerSimpleByNameAndAddressQueryResponse_InService", targetNamespace = "", wsdlLocation = "file:/C:/SAP/IDE/ct0315/workspace/Customer/wsdl/CustomerSimpleByNameAndAddressQuery/wsdlroot.wsdl")
public class CustomerSimpleByNameAndAddressQueryResponseInService extends {

static { url = null;
try { tmpUrl = Thread.currentThread().getContextClassLoader().getResource("wsdl/sap/bc/srt/xip/sap/ECC_CUSTOMER002QR/wsdlroot.wsdl");
url = new, tmpUrl.getHost(), tmpUrl.getPort(), tmpUrl.getFile());
} catch ( e) {
* Default service constructor.

Part 4: Creating a Web Service Client Web Application

Creating a new JSP


To invoke the standalone proxy you need a new JSP page.


1. Choose File -> New -> JSP .

2. In the popup-window enter the class name: index.
3. Click Finish.

Creating source code


To invoke the standalone proxy you have to create instances, insert authentication and set the values for the request. The complete source code of the class is also available at the end of this chapter.

Coding (Tested with SAP NW 7.1)

  • No labels