Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

JAXWS/SmokeTestScenarios/

< JAXWS
Revision as of 18:20, 14 October 2009 by Shane clarke.hotmail.com (Talk | contribs) (New page: <h2>Prereqs</h2> * Download and Install the Apache CXF Runtime (version 2.2.x) from the [http://cxf.apache.org/download.html Apache CXF] downloads page. * Configure the Apache CXF Runtime ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Prereqs

  • Download and Install the Apache CXF Runtime (version 2.2.x) from the Apache CXF downloads page.
  • Configure the Apache CXF Runtime in the Window > Preferences > Web Services > CXF 2.x Web Services preference page.
  • Install the latest version of Apache Tomcat.

Scenario 1: Create a Bottom Up Web Service

  1. Create a Dynamic Web Project.
  2. Import the wtp/Converter.java class into the source folder of Dynamic Web Project.
  3. Right-click on the Converter.java class and select Web Services > Create Web Service to open the Web Service wizard.
  4. Move the slider to the Test service stage.
  5. In the Service Configuration: section:
    1. Verify that Apache Tomcat is the selected Server:. (Or select an alternate server to deploy the web service to)
    2. Select the Web service runtime: link and select 'Apache CXF 2.x' in the resulting dialog.
    3. Verify that the selected Service project: is the Dynamic Web Project that contains the Converter.java class.
  6. Click Next >.
  7. Select the Use a Service Endpoint Interface: checkbox.
  8. Select the Create an SEI radio button.
  9. Enter a name for the SEI in the text field.
  10. Click the Select All button.
  11. Click Finish. After creating the service, deploying to and starting Tomcat, the wizard will launch the Web Services Explorer.
  12. In the Web Services Explorer
    1. Under Operations in the right hand pane, click on farenheitToCelsius.
    2. In the float entry field enter a 72.0 and click Go.
    3. The Status pane should display return (float): 22.222221

Scenario 2: Create a Top Down Web Service

  1. Create a Dynamic Web Project.
  2. Import the AreaService.wsdl into the Dynamic Web Project's WebContent folder.
  3. Right-click on the AreaService.wsdl file and select Web Services > Generate Java bean skeleton to open the Web Service wizard.
  4. Move the slider to the Test service stage.
  5. In the Service Configuration: section:
    1. Verify that Apache Tomcat is the selected Server:. (Or select an alternate server to deploy the web service to)
    2. Select the Web service runtime: link and select 'Apache CXF 2.x' in the resulting dialog.
    3. Verify that the selected Service project: is the Dynamic Web Project that contains the AreaService.wsdl file.
  6. Click Finish.
  7. Open the generated implementation class org.tempuri.areaservice.AreaServiceImpl.
    1. Replace the generated method body of the calculateRectArea() method to return parameters.getHeight() * parameters.getWidth() and save the class.
    2. Restart the Apache Tomcat server.
  8. In the Web Services Explorer
    1. Under Operations in the right hand pane, click on CalculateRectArea.
    2. In the width float entry field enter a 12.0 and in the height float entry field enter 2.0 click Go.
    3. The Status pane should display area (float): 24.0

Scenario 3: Create a Web Service Client

Scenario 4: Annotation Properties View

Scenario 5: Annotation Validation

Scenario 6: Quick Fixes and Content Assist

Copyright © Eclipse Foundation, Inc. All Rights Reserved.