16.10.2015 Views

Getting Started with WebSphere Application Server

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7 – Web services 135<br />

Figure 7.4 - Resolve class path errors<br />

4. Developing the project<br />

Right click the package com.ibm.wasce.clients and select New -> Class to<br />

create a new java class named PojoClient. Then paste the code shown in<br />

Listing 7.5.<br />

package com.ibm.wasce.clients;<br />

import com.ibm.wasce.samples.*;<br />

public class PojoClient {<br />

public static void main(String args[]) {<br />

try {<br />

HelloBillService service = new HelloBillService();<br />

HelloPeople bill = service.getHelloBillPort();<br />

System.out.println(bill.sayHello("Rex"));<br />

} catch (Exception e) {<br />

e.printStackTrace();<br />

}<br />

}<br />

}<br />

Listing 7.5 – A POJO Client

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

Saved successfully!

Ooh no, something went wrong!