This page details the steps necessary to create a SOAP REST client, using eclipse, that is able to communicate with the holiday web service. For the client I used Jersey, and downloaded the client and core jars here.
1. Create a new project using eclipse
2. Add the Jersey jars to the buildpath.
2. Go to Run Configurations
- a. Under Java Applications -> main tab
- i. Set main class to: org.apache.axis.wsdl.WSDL2Java
- ii. Set Project to whatever project you created
- iii. Set name to whatever name you want.
- b. Under Java Applications -> arguments tab
- i. Set Program Arguments to: http://localhost:8080/holidayWebService/services/holiday?wsdl -o src (The url location for the wsdl)
- c. Under Java Applications -> classpath tab i. Add in latest jars for:
- activation.jar
- axis.jar
- commons-discovery.jar
- commons-logging.jar
- commons-net.jar
- jaxrpc.jar
- jaxrpc-api.jar
- mail.jar
- saaj.jar wsdl4j.jar (also add these jars to the buildpath, these jars are available in the misint -> holidayWebService repository in the HolidayServiceClient Project) Add the Jersey jars to the classpath
NOTE: When creating a client for the test server it is required that you add the test site's certificate to the keystore as described here,
and then run the project with arguments (In Eclipse these should be added to the VM arguments of your project's run
configuration):
...