Java Reference
In-Depth Information
5.6 Develop a Web Service Consumer
5.6.1 Create Client Stub with wsimport
First, create a Java Project under Eclipse IDE and call it 'cxf-ws-client'
.
1.
At the command prompt, go to the Java Project for Eclipse called 'cxf-ws-client'
.
2.
Create a folder called 'generated'
.
3.
To generate Web Service stubs, run the following command:
wsimport -d . http://localhost:8080/cxf-ws/employees?WSDL
4.
To create a Java library, run the following command:
jar -cvf ../lib/cxf-ws-generated.jar *
5.
Now, verify the content of the created jar:
jar -tf ../lib/cxf-ws-generated.jar *
The content of the library should look like this:
META-INF/
META-INF/MANIFEST.MF
com/ com/bemach/
com/bemach/ObjectFactory.class com/be-
mach/ws/
com/bemach/ws/cxf/
com/be-
mach/ws/cxf/Employee.class
com/bemach/ws/cxf/EmployeeDataIf.class
com/bemach/ws/
cxf/EmployeeDataService.class
com/bemach/ws/cxf/Ob-
jectFactory.class
com/bemach/ws/cxf/package-info.class
Search WWH ::




Custom Search