16.10.2015 Views

Getting Started with WebSphere Application Server

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

com/ibm/wasce/samples/package-info.java<br />

Listing 7.4 – Output stubs generated by wsimport<br />

Chapter 7 – Web services 133<br />

3. All the stubs should have been created and placed in c:\stubs directory. You<br />

now need to create the class HelloBillService and interface HelloPeople<br />

for accessing the Web Service:<br />

• HelloBillService.java - This file extends the javax.xml.ws.Service and<br />

provides a method to create a service and retrieve the port.<br />

• HelloPeople.java - This is the Service Endpoint Interface that is required to<br />

access the Web Service.<br />

7.3.2 Creating a POJO client<br />

To create a POJO client, follow these steps:<br />

1. Create a general Java Project in Eclipse<br />

In the File menu, click New -> Java Project.<br />

2. Import the stubs to the project<br />

In Eclipse, right click the src folder of the client project in the project explorer and<br />

select Import -> General: File System. A window will open to let you select the<br />

stubs folder and help you import the stubs to the client project automatically. This<br />

is shown in Figure 7.3 below.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!