Previous  Table of Contents  Next  

  J2EE Tools - Lightweight IDE for J2EE Version 1.4  
     
 

GETTING STARTED

Create, Build, Deploy and Run Hello World 2 Web Service

This page describes how to create, build, deploy and run a new web service called Hello World 2.
  1. Create Hello World 2 Web Service Directories:

    1. Click the Application tab in the J2EE Tools window.
    2. Click the Project Directory box in the Application tab then click jaxrpc in the popup list.
    3. Click File | Create | Application Directory.
    4. Type helloworld2 in the Input dialog then click OK.
    5. Click File | Create | Application Subdirectory.
    6. Type src in the Input dialog then click OK.
    7. Click File | Create | Application Directory.
    8. Type helloworld2staticstub in the Input dialog then click OK.
    9. Click File | Create | Application Subdirectory.
    10. Type src in the Input dialog then click OK.
  2. Create Hello World 2 Web Service Names:

    1. Click the Application Directory box in the J2EE Tools window then click helloworld2 in the popup list.
    2. Click File | Create | Service Name.
    3. Type HelloWorld2 in the Input dialog then click OK.
    4. Click the Application Directory box then click helloworld2staticstub.
    5. Click File | Create | Service Name.
    6. Type HelloWorld2 in the Input dialog then click OK.
  3. Create Hello World 2 Web Service Build Files:

    1. Click the Application Directory box in the J2EE Tools window then click helloworld2 in the popup list.
    2. Click File | Create | Build File | Properties.
    3. Type build.properties (default) in the Input dialog then click OK.
    4. Click File | Create | Build File | Project.
    5. Type build.xml (default) in the Input dialog then click OK.
    6. Click the Application Directory box then click helloworld2staticstub.
    7. Click File | Create | Build File | Properties.
    8. Type build.properties (default) in the Input dialog then click OK.
    9. Click File | Create | Build File | Project.
    10. Type build.xml (default) in the Input dialog then click OK.
  4. Create Hello World 2 Web Service Java Files:

    1. Click the Application Directory box in the J2EE Tools window then click helloworld2 in the popup list.
    2. Click the Application Subdirectory box then click src.
    3. Click File | Create | Java File | Web Service | Interface.
    4. Type HelloWorld2IF.java (default) in the Input dialog then click OK.
    5. Click File | Create | Java File | Web Service | Implementation.
    6. Type HelloWorld2Impl.java (default) in the Input dialog then click OK.
    7. Click the Application Directory box then click helloworld2staticstub.
    8. Click the Application Subdirectory box then click src.
    9. Click File | Create | Java File | Web Service | Client | Static Stub.
    10. Type HelloWorld2Client.java (default) in the Input dialog then click OK.
  5. Create Hello World 2 Web Service Configuration Files:

    1. Click the Application Directory box in the J2EE Tools window then click helloworld2 in the popup list.
    2. Click File | Create | Configuration File | Service.
    3. Type config-interface.java (default) in the Input dialog then click OK.
    4. Click the Application Directory box then click helloworld2staticstub.
    5. Click File | Create | Configuration File | Client.
    6. Type config-wsdl.java (default) in the Input dialog then click OK.
  6. Build Hello World 2 Web Service:

    1. Click the Application Directory box in the J2EE Tools window then click helloworld2 in the popup list.
    2. Click the Build File box then click build.xml.
    3. Click the Build Target box then click build-service.
    4. Click Tools | Build.
    5. Wait until Build Successful appears in the Build Target window.
    6. Click the X in the top right corner of the Build Target window.
  7. Start Application Server:

    1. Click Tools | Application Server | Start in the J2EE Tools window.
    2. Wait until Application server startup complete appears in the Start Application Server window.
    3. If the domain window appears, click _ (minimize) in the top right corner of the domain window.
  8. Create Hello World 2 Web Service Web Archive File:

    1. Click Tools | Deployment | Console in the J2EE Tools window.
    2. Wait until the Deployment Tool window appears.
    3. Click File | New | Web Component in the Deployment Tool window.
    4. Click Next in the New Web Application Wizard - Introduction dialog.
    5. Click Create New Stand-Alone WAR Module in the New Web Application Wizard - WAR File dialog.
    6. Click Browse to the right of the WAR Location field.
    7. Click Up One Level in the Create Module File dialog until Desktop appears in the Look In box.
    8. Double click My Computer in the area under the Look In box.
    9. Double click Local Disk (C:).
    10. Double click the fieldbird directory.
    11. Double click the j2eetools directory in fieldbird directory.
    12. Double click the j2ee directory in j2eetools directory.
    13. Double click the projects directory in j2ee directory.
    14. Double click the jaxrpc directory in projects directory.
    15. Double click the helloworld2 directory in jaxrpc directory.
    16. Click the File Name field then type helloworld2-jaxrpc.war.
    17. Click Create Module File.
    18. Verify that the WAR Location field in the New Web Application Wizard - WAR File dialog contains C:\fieldbird\j2eetools\j2ee\projects\jaxrpc\helloworld2\helloworld2-jaxrpc.war.
    19. Click the WAR Name field then type MyHelloWorld2Service in the field.
    20. Click Edit Contents.
    21. Verify that the Starting Directory box in the Edit Contents dialog contains C:\fieldbird\j2eetools\j2ee\projects\jaxrpc\helloworld2.
    22. Double click C:\fieldbird\j2eetools\j2ee\projects\test\helloworld2 in the Available Files area.
    23. Click the build directory in the helloworld2 directory.
    24. Click Add.
    25. Click OK.
    26. Click Next in the New Web Application Wizard - WAR File dialog.
    27. Click Web Services Endpoint in the New Web Application Wizard - Choose Component Type dialog.
    28. Click Next.
    29. Click Define New Service in the New Web Application Wizard - Choose Service dialog.
    30. Click the WSDL File box then click WEB-INF/wsdl/MyHelloService.wsdl.
    31. Click the Mapping File box then click build/mapping.xml.
    32. Click Next.
    33. Click the Service Endpoint Implementation box in the New Web Application Wizard - Component General Properties dialog then click helloworld2.HelloWorld2Impl in the popup list.
    34. Click Next.
    35. Click the Service Endpoint Interface box in the New Web Application Wizard - Web Service Endpoint dialog then click helloworld2.HelloWorld2IF in the popup list.
    36. Click the Namespace box then click urn:Foo.
    37. Click the Local Part box then click HelloWorld2IFPort.
    38. Click Next.
    39. Click Finish in the New Web Application Wizard - Next Steps dialog.
  9. Create Hello World 2 Web Service Endpoint Address in Web Archive File:

    1. Click MyHelloWorld2Service on the left side of the Deployment Tool window.
    2. Click the General tab on the right side of the Deployment Tool window.
    3. Click the Context Root field in the General tab then type /helloworld2-jaxrpc in the field.
    4. Click HelloWorld2Impl under MyHelloWorld2Service on the left side of the Deployment Tool window.
    5. Click the Aliases tab on the right side of the Deployment Tool window.
    6. Click Add in the Aliases tab.
    7. Click the field under Aliases then type /helloworld2 and press the Enter key.
    8. Click the Endpoint tab.
    9. Click the Endpoint Address box at the bottom of the Endpoint tab then click helloworld2 in the popup list.
    10. Click File | Save in the Deployment Tool window.
    11. Click File | Exit.
  10. Deploy Hello World 2 Web Service Web Archive File on Application Server:

    1. Click Tools | Deployment | Deploy in the J2EE Tools window.
    2. Wait until Command deploy executed successfully appears in the Deploy Archive File window.
    3. Click the X in the top right corner of the Deploy Archive File window.
  11. Build Hello World 2 Web Service Static Stub Client:

    1. Click the Application Directory box in the J2EE Tools window then click helloworld2staticstub in the popup list.
    2. Click the Build File box then click build.xml.
    3. Click the Build Target box then click build-static.
    4. Click Tools | Build.
    5. Wait until Build Successful appears in the Build Target window.
    6. Click the X in the top right corner of the Build Target window.
  12. Run Hello World 2 Web Service Static Stub Client:

    1. Click the Build Target box in the J2EE Tools window then click run-client in the popup list.
    2. Click Tools | Build.
    3. Wait until Hello World 2 Service Implementation appears in the Build Target window followed by Build Successful.
    4. Click the X in the top right corner of the Build Target window.
  13. Undeploy Hello World 2 Web Service Web Archive File on Application Server:

    1. Click the Application Directory box in the J2EE Tools window then click helloworld2 in the popup list.
    2. Click Tools | Deployment | Undeploy.
    3. Wait until Command undeploy executed successfully appears in the Undeploy Archive File window.
    4. Click the X in the top right corner of the Undeploy Archive File window.
  14. Stop Application Server:

    1. Click Tools | Application Server | Stop in the J2EE Tools window.
    2. Wait until JMS service shutdown complete appears in the Start Application Server window.
    3. Click the X in the top right corner of the Start Application Server window.
    4. Click the X in the top right corner of the Stop Application Server window.
 

 
Get J2EE Tools from Field Bird at SourceForge.net Previous  Table of Contents  Next