O'Reilly logo

Enterprise SOA by Thomas Mattern, Dan Woods

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How do you create a service provider in Java?

In Chapter 15, we described how to service enable a Remote Function Call (RFC), creating a service from the inside out using ABAP. The process for service enabling a method in a Java class or EJB is quite similar, but it is worth taking a detailed look from the Java side. Similar to the example in Chapter 15, we will be providing employee address data through the web service we create in this section.

Since we are enabling existing functionality, we will assume that the EJB to be exposed already exists and that it has been imported into SAP NetWeaver Developer Studio or created in that development environment. We will also assume that an existing Enterprise Archive (EAR) project is associated with this EJB. In this example, we will work with a stateful session bean.

We start the Web Service Creation Wizard by right-clicking on the bean we want to service enable and selecting New → Web Service, as shown in Figure 16-2.

Service enabling an EJB

Figure 16-2. Service enabling an EJB

The Web Service Creation Wizard starts, as shown in Figure 16-3.

The Web Service Creation Wizard

Figure 16-3. The Web Service Creation Wizard

If you read Chapter 15, you may notice that the Java version of this wizard looks a bit different from the ABAP version. The Source Folder and Endpoint fields default to values appropriate ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required