3 Lab 1 - WebSphere Workspace Configuration In this lab you will configure the RAD workspace to work with a WebSphere test environment server. This will include creating a WebSphere "profile" which will have the server definition. It is sometimes useful to have different profile configurations for testing purposes so this process is good to be familiar with. Part 1 - Create Profile The WebSphere Application Server software is installed along with RAD. In this section you will run a standard WebSphere tool, the Profile Management Tool, to create a profile. 1. From the Windows Start menu select Start Programs IBM Software Delivery Platform IBM Rational Application Developer 8.0 Rational Application Developer. 2. In the workspace window, change the Workspace to C:\workspace 3. Click OK. 3

4 RAD will start. 4. In the Runtime environment and profile settings dialog that appears check that the option to '<Create a new profile>' is available and click the Next button. Note: If you DO NOT get this prompt it is possible that a profile was created for this workspace already. Since it is always best for the user who will be using the workspace to create the profile restart RAD and use a different workspace with RAD. Inform your instructor of this to see if it is a common problem in the class. If there is an existing profile listed in the dialog a previous profile may already exist. Let your instructor know about this because although this profile can likely be used with your workspace, if it has applications deployed to it from another workspace, there may be errors when starting the server. It is also possible to run the 'Profile Management Tool' to create a new profile but this will be complex and should be guided by the instructor. 4

5 5. Uncheck the 'enable administrative security on the profile' option as shown below and click the Finish button. The Features with Trial Licenses dialog will open. 6. Click Ignore. 7. If prompted about help content select Work without Help. 8. Wait until the messages in the lower right corner of RAD disappear to know the work of creating the server is complete. 5

6 9. If prompted by Windows firewall security hit the Cancel button. 10. Close the Welcome page if it appears. 11. Select the Servers view on the bottom of the Java EE perspective. 12. Check that a WebSphere Application Server v8.0 server is shown. 13. Open the following file: C:\IBM\WebSphere\AppServer\logs\manageprofiles\AppSrv1_create.log 14. Look at the end of the file for the message: If you see the message INSTCONFSUCCESS, it means that the WebSphere Application Server profile was created correctly. 6

7 15. Close the log file. 16. Switch back to RAD and the Servers view. 17. Make sure the server is stopped. 18. Double click on the server to open the server properties. 19. On the right, expand Publishing and select the 'Never publish automatically' option. 20. Save and close the server properties. 21. Select the WebSphere Application Server v8.0 server that was created in the Servers view and click the Start the server button on the right. 7

8 22. From the menu, select Window > Show View > Console. 23. Check the Console view as the server starts to look for errors. 24. Switch back to the Servers view and check that the server was started. 25. Stop the server. Part 2 - Review You have now configured a test server to use with the RAD workspace. 8

9 Lab 2 - Introduction To Web Services In this lab, you will review some of the key components of Web Services, namely, WSDL and SOAP. You will also get a chance to see a Web Service in action. The goal of this lab is to get yourself familiar with what a Web service looks like. We will not get into too much detail at this point; just walk away with a basic understanding of the components involved in a web service. The web service in question is very simple. It has one operation called sayhello. It takes as input a person's name (say "John") and returns as output a greeting message (say, "Hello John"). Part 1 - Import the Projects To save time, the web service is already implemented. You will simply import it into RAD for examination. You should be in the Java EE perspective, from which we will do the bulk of our work. The next step is to import the projects into the workspace. 1. Right-click anywhere inside the Enterprise Explorer view (the pane on the left) and select Import Import The Import screen will appear. In the list of import sources, expand General and select Existing Projects into Workspace. 3. Click Next. The Import Projects screen will appear. 4. Select the radio button for Select archive file. 5. Next to it, click the Browse... button. 6. Select the C:\LabFiles\TestWS.zip file and click Open. The list of Projects will automatically be populated, as shown here: 9

10 7. Click Finish. The projects will be imported into the workspace and will be listed in the Enterprise Explorer view. The two projects imported in the workspace are: 1. TestApp The enterprise application project. This represents the EAR file in Java EE. 2. TestWeb The web module project. This represents a WAR file in Java EE Our projects are imported. Let us take a look at them. Part 2 - Inspect the Implementation Class The business logic for a web service is implemented in a Java class. The Java class may be a plain class or a session EJB. In this case, we used a plain Java class in a web module. We will briefly have a look at it. 1. In the Enterprise Explorer view, expand the TestWeb project as shown below. 10

11 2. Double click HelloSvc.java to open it in a Java source code editor. 3. Examine the class. Note the following aspects of the code: By default, the Java method that implements a Web Service operation has the same name as the operation. annotation is used to designate the HelloSvc class as a Web Service implementation. annotation is used for the sayhello() method to designate it as a Web Service operation. These annotations are made available as a part of the JAX-WS specification. 4. Close the Java editor, by clicking the X in its tab. 5. Back in the Enterprise Explorer, notice the Services node of the TestWeb project. Expand it. 11

12 This Services node lists all web services located in this web project. Notice that it has located the HelloService service, and is listing it here accordingly, as {http://svc.webage.com/}hellosvcservice. This is a good sign that our annotations are correct. Remember this node; we will be returning to it frequently. We can now test the service! Part 3 - Deploy the Project to WebSphere Application Server (WAS) Before we can test the service, we first need to deploy it to WAS. We will do this now. 1. Locate the Servers view. The server listed here is the one we will be using for all our deployments for the duration of this course. We now need to add our TestApp project to it. (Recall that the TestApp is an EAR file which contains TestWeb, which in turn contains the service). 2. Right-click on the server listed and select Add and Remove The Add and Remove Projects window will appear. In the left pane, select TestApp and click the Add> button. This will move it to the right pane. The next time WAS is started, the project will be deployed. 12

13 4. Click Finish. Remember these steps as you will be deploying projects to WAS repeatedly throughout this course. 5. Back in the Servers view, expand the server and you should see the newly added project. We can now start the server. 6. Start the server by right-clicking on it (in the Servers view) and selecting Start. The server will start up, and the Console view will open. This will display the output of the server as it boots up. 7. Open again the Servers view and verify the server's State is Started and the server's Status is Synchronized. A Synchronized state means all the latest versions of the code in RAD have been deployed to the server. This means we are able to test our code! Note that the application is stopped we need to start it. 8. Right click the server and select Publish. Now the application is Started and Synchronized. Part 4 - Examine the WSDL File A WSDL file is used to describe what a web service can do and what type of input and output data it works with. Let us examine the WSDL file for our service. 1. In the Enterprise Explorer view, right click on the service beneath the Services node (in the TestWeb project) and select Show WSDL Interface. 13

14 RAD will open the WSDL Editor, which shows a diagram of the service's WSDL file. 2. This looks daunting, but we will return to it in more detail in a later lab. For now, click the Source tab at the bottom of the WSDL editor. The raw XML source code of the WSDL editor will be visible. To be honest, this looks even more frightening than the diagram view. Do not worry about it for now, though. 3. Locate the <porttype> element of the file. This describe the Web Service. Note that an <operation> element exists with the name attribute set to "sayhello". 4. Notice the <input> and <output> elements within <operation>. They describe the format of the input and output data for the operation. We won't go any further to explore the WSDL at this stage, but will return to it in a later lab. 14

15 5. Close the WSDL editor. Part 5 - Invoke the Service We should now actually test the service. Testing the service would imply actually invoking the operation. Typically, doing so would require that we create a web service client. A web service client is, as its name implies, any program that makes a call to a web service. The program could be written in Java,.NET, or any other language that understands web service standards. Writing a client can be time consuming, so we will cheat and use a tool built into RAD called the Web Services Explorer (WSE). The WSE works by reading a WSDL file and then figuring out what services are available and how to invoke them. The WSE will then dynamically generate a form that represents the service's operations that will allow you to invoke it. Think about this for a moment: our service, at its core, was a single operation called sayhello which took a single string as a parameter. The service would then return a greeting based on that parameter. Let us try this now. 1. In the Enterprise Explorer, under TestWeb, right-click the service (under Services) and select Test with Web Services Explorer. The WSE will open. 15

16 Notice that it has located our service and has noticed the sayhello operation, which is listed in the right pane. 2. Click the link for sayhello. The WSE will create and display a form to enter the input data for the sayhello operation. The WSE realizes that the operation requires a parameter, and the form presents a location to add one. 3. Click the Add link and enter a name. 16

17 4. Click Go. The WSE will take the name you entered and submit it to the service. The Status pane should now appear, immediately below the pane in which you entered the argument. This shows what the call to the web service returned. In this case, it will show Hello [name] Our service works! We have successfully tested our service with the WSE. Part 6 - Inspect the SOAP Messages When we invoked the sayhello operation, WSE actually sent a SOAP formatted XML document to the server using the HTTP protocol. The server also replied back using a SOAP formatted XML document. SOAP is a versatile data format for request response type communication. In its most basic form, as is the case in this lab, it is utterly simple. At the same time, it is capable of taking on more advanced aspects of communication, such as, encryption, message signature, transaction and guaranteed delivery. 1. In the Status pane of WSE, click the Source link. The raw underlying XML SOAP messages will be displayed. 17

18 2. The windows are probably too small to see, however; double-click in the pane header (where it says Status) to maximize the window. 3. Briefly inspect the request and response messages as shown above. Don't worry about the details. You will learn SOAP shortly. 4. Restore the Status window to the original size. Congratulations! You have successfully examined the source code for a web service, and then invoked it via the WSE. 18

19 5. Close the WSE by clicking the X in its pane. 6. Close all open windows by selecting CTRL+Shift+W. 7. Stop the server. To do this, open the Servers view, right-click on the server listed and select Stop. Part 7 - Review In this lab, you had a brief encounter with a web service. First, we looked at the Java class that implements the business logic of the Web Service. That is the true meat behind the Web Service. When building a Web Service, you will probably spend most of the time writing the business logic. Next, we inspected the WSDL file that describes the nature of the Web Service. After that we tested the Web Service and inspected the SOAP messages. The lab also served two other purposes. You learned how to deploy an application to the server. We will do that frequently throughout these lab exercises. You also found out how to use the Web Services Explorer to quickly unit test a Web Service. 19

Rational Application Developer v7.0 (RAD7) trial version. Installation guide. Warning: You cannot use ghosting or disk imaging to install this software. You must install the software on each machine separately.

IBM Operational Decision Manager Version 8 Release 5 Getting Started with Business Rules Note Before using this information and the product it supports, read the information in Notices on page 43. This

Web Services Objectives After completing this lab, you will be able to: Given Create a Web Service from a Java Bean Test a Web Service using a generated test client and the Web Services Explorer The following

Rational Developer for Power (RDp) Trial Download and Installation Instructions Notes You should complete the following instructions using Internet Explorer or Firefox with Java enabled. You should disable

Creating a Web Service using IBM Rational HATS For IBM System i (5250) Creating a Web Service using HATS 1 Lab instructions This lab teaches you how to use IBM Rational HATS to create a Web service that

QUANTIFY INSTALLATION GUIDE Thank you for putting your trust in Avontus! This guide reviews the process of installing Quantify software. For Quantify system requirement information, please refer to the

E-mail Listeners 6 E-mail Formats You use the E-mail Listeners application to receive and process Service Requests and other types of tickets through e-mail in the form of e-mail messages. Using E- mail

Query JD Edwards EnterpriseOne Customer Credit using Oracle BPEL Process Manager 1 Overview In this tutorial you will be querying JD Edwards EnterpriseOne for Customer Credit information. This is a two

DEVELOPING CONTRACT - DRIVEN WEB SERVICES USING JDEVELOPER Purpose: The purpose of this tutorial is to develop a java web service using a top-down approach. Topics: This tutorial covers the following topics:

Creating Web Services Applications with IntelliJ IDEA In this tutorial you will: 1. 2. 3. 4. Create IntelliJ IDEA projects for both client and server-side Web Service parts Learn how to tie them together

How to guides: AppManager v7.04 Initial Setup for a trial By NetIQ Prepared by Haf Saba Senior Technical Consultant Asia Pacific 1 Executive Summary This document will walk you through an initial setup

1 of 13 13/05/2008 11:21 AM 1. BPEL Hands-On: HelloWorld This hands-on exercise is designed to introduce you BPEL development by creating, deploying, and running a simple "HelloWorld" example. Prerequisites

44 Working with WebSphere 4.0 This chapter is for developers who are familiar with WebSphere Application Enterprise Server, version 4.0 (WAS 4.0) and would like to deploy their applications using WAS 4.0.

Community TechNote Single-sign-on between MWS custom portlets and IS services Abstract Version 2 Updated 22 Sep 2009 This article describes how to use Single- Sign-On in the authentication of MWS portlets

Quick Start Guide Installation and Setup Introduction Velaro s live help and survey management system provides an exciting new way to engage your customers and website visitors. While adding any new technology

T320 E-business technologies: foundations and practice Block 3 Part 6 Activity 2: Testing a web service for WS-I conformance Prepared for the course team by Neil Simpkins Introduction 1 Configuring the

with Group Policy for SyAM System Client Installation SyAM System Client can be deployed to systems on your network using SyAM Management Utilities. If Windows Firewall is enabled on target systems, it

IBM WEBSPHERE ADAPTER 6.0.2 LAB EXERCISE Copyright IBM Corporation 2007 All rights reserved Install and configure e-mail server What this exercise is about... 1 What you should be able to do... 1 Introduction...

5.0 10.3.1.8 Lab - Configure a Windows 7 Firewall Print and complete this lab. In this lab, you will explore the Windows 7 Firewall and configure some advanced settings. Recommended Equipment Step 1 Two

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link: ftp://ftp.software.ibm.com/storage/tivoli-storagemanagement/maintenance/client/v6r2/windows/x32/v623/

USING SSL/TLS WITH TERMINAL EMULATION This document describes how to install and configure SSL or TLS support and verification certificates for the Wavelink Terminal Emulation (TE) Client. SSL/TLS support

Using Ambient by Duke Curious 2004 preparing the environment Before you can use the Duke Ambient environment to start working on your projects or labs, you need to make sure that all configuration settings

Customizing Confirmation Text and Emails for Donation Forms You have complete control over the look & feel and text used in your donation confirmation emails. Each form in Sphere generates its own confirmation

Introduction EASYLABEL 6 has several new features for saving the history of label formats. This history can include information about when label formats were edited and printed. In order to save this history,

TIBCO ActiveMatrix Service Bus Getting Started Software Release 2.3 February 2010 Important Information SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR BUNDLED TIBCO

Notepad++ The COMPSCI 101 Text Editor for Windows The text editor that we will be using in the Computer Science labs for creating our Python programs is called Notepad++ and http://notepad-plus-plus.org

Using Group Policies to Install AutoCAD CMMU 5405 Nate Bartley 9/22/2005 Before we get started This manual provides a step-by-step process for creating a Group Policy that will install AutoCAD to a Windows

UNIT 5 ADDITIONAL PROJECTS BEFORE YOU BEGIN The RODC must be configured to use the RWDC as its Preferred DNS Server. Active Directory is installed on the RWDC. The RODC must be a member server within the

USING STUFFIT DELUXE StuffIt Deluxe provides many ways for you to create zipped file or archives. The benefit of using the New Archive Wizard is that it provides a way to access some of the more powerful

Installing the Active Directory Domain Services Role Press the Ctrl-Alt-Del on the xxrwdc computer. Log in as the default administrator of the local computer with the username Administrator and cisisthebest!

Allworx OfficeSafe Operations Guide Release 6.0 No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopy,

5 Creating XML Report Web Services In the previous chapters, we had a look at how to integrate reports into Windows and Web-based applications, but now we need to learn how to leverage those skills and

SyAM Management Utilities and Non-Admin Domain Users Some features of SyAM Management Utilities, including Client Deployment and Third Party Software Deployment, require authentication credentials with

Managing Linux Servers with System Center 2012 R2 System Center 2012 R2 Hands-on lab In this lab, you will use System Center 2012 R2 Operations Manager and System Center 2012 R2 Configuration Manager to

IS L06 Protect Servers and Defend Against APTs with Symantec Critical System Protection Description Lab flow At the end of this lab, you should be able to Discover how to harness the power and capabilities

5.6.3 Lab: Registry Backup and Recovery in Windows XP Introduction Print and complete this lab. In this lab, you will back up a computer registry. You will also perform a recovery of a computer registry.

IBM WebSphere Adapter for PeopleSoft Enterprise 6.2.0 Quick Start Tutorials Note: Before using this information and the product it supports, read the information in "Notices" on page 94. This edition applies