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.

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!