Generating and Deploying Web Services using All Fusion
Generating and Deploying Web Services using All. Fusion Gen r 7. 5 Farhan Shaikh CA Session #14 June 12, 2006 © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 1
Overview • • • What is a Web Service? Technical Requirements Web Server Setup Wizard Installation Using the Wizard Testing the Web Service Review Questions Demo © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 2
What is a Web Service? • • • A Web Service is a web based software component that can be accessed by clients using XML-based protocols such as SOAP (Simple Object Access Protocol) Benefits – Provides a means of communication for software applications running on different platforms and written in different languages – Enables a service-oriented architecture (SOA), which is an architectural style that promotes software reusability by creating reusable services – Makes business operations available over the Internet Challenges – Are in initial stages and evolving rapidly – Rely on standards and specifications still being defined by products and technologies • For more information on Web Services visit the following link: http: //java. sun. com/blueprints/guidelines/designing_webservices/html/ © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 3
What is a Web Service? (cont) Great Adventures Inc. Intranet Hand held client Client based on any platform Customer relations management system SO AP P SOA Order receiver (web service) P OA Order tracker (web service) SO AP S Browser client P SOAP Stand alone client AP SOA P A SO Order processing workflow Internet Car Rental Information (Web Service) Airline Information (Web Service) Hotel Information (Web Service) © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 4
Technical Requirements • All. Fusion Gen r 7. 5 Toolset • Java Software Development Kit: Release 1. 5 • Web Service Application Server: Apache-Axis 1. 0 or greater • Application Server: Tomcat 4. 1. 24 • Web Service Wizard Plug-in © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 5
Web Server Setup • Install Axis http: //www. axint. net/apache/ws/axis • Install Tomcat http: //archive. apache. org/dist/tomcat-4/v 4. 1. 30/bin/ • Place Axis under Tomcat <drive>: axis-1_4webappsaxis to <drive>: jakarta-tomcat-4. 1. 30webapps • Setup the System environment variables – – axis_home axis_lib catalina_home axisclasspath (Note: Read the Web Service Wizard Guide for complete instructions on setting up the environment variables) © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 6
Wizard Installation Web Service Wizard Plug-in – Available on product CD – Separate installation process – Release of Gen must match release of Wizard Plug-in – Wizard uses the Runtimes files installed with the Construction Toolset – Default location for the Wizard installation is C: Program FilesCA Web Service Wizard © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 7
Wizard Installation (cont) Once installed the Web Service Wizard becomes available in the Toolset as a Plug-in © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 8
Using the Wizard • Pre-requisite – Generate a Java Proxy with XML Interface – Proxy generated XML Schema Definition (XSD) file is used to generate the WSDL file for the web service • Read the Web Service Wizard Guide – – – – Wizard installation Generating and Deploying Web Services Installing and setting up the Web Servers Debugging error messages Modifying Wizard Templates Manual Deployment Using the generated Sample Client © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 9
Using the Wizard (cont) Welcome screen © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 10
Using the Wizard (cont) Selecting Operations Note: If there is more than one method/operation selected in the service, the sample client contains code that calls only one of them © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 11
Using the Wizard (cont) Application Server Information Note: Replace localhost with actual Web Server machine name © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 12
Using the Wizard (cont) Deployment Options © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 13
Using the Wizard (cont) Review Selections © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 14
Using the Wizard (cont) Generation and Deployment Progress Note: Notepad window must be closed for rest of the generation process to continue 15 © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies.
Using the Wizard (cont) Generation and Deployment Progress (cont) © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 16
Using the Wizard (cont) Files Created Web Service files generated by the Wizard in the model. iefWeb. Services<web servicename> directory Web Service jar file created by the Wizard and deployed to Axis residing under Tomcat web server © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 17
Using the Wizard (cont) Files Created (cont) • • • <service. Name>. java The XML Java proxy wrapper source file <service. Name>Client. java A sample java client that calls one of the methods in the service <service. Name>. class The compiled Java class file <service. Name>. wsdl Specifies the location of the service and the operations the service exposes <service. Name>Deploy. wsdd The Web Service Deployment Description (WSDD) file used to tell Axis that the service is available <service. Name>Undeploy. wsdd The WSDD file used to remove the service from Axis’ view © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 18
Using the Wizard (cont) Files Created (cont) • <service. Name>_java. bat The windows batch file used to compile the Java source • <service. Name>_java. mak The make file used by the windows batch file to compile the Java source • <service. Name>_java. log This file contains the results of the compile and deploy steps • <service. Name>_deploy. bat This file is the Windows batch file used to deploy the generated class file and WSDL file as well as all the other parts of the web service. © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 19
Testing the Web Service • Edit and compile the Web Service Client <webservicename>Client. java • Start Tomcat • Publish the Web Service java org. apache. axis. client. Admin. Client <webservicename>Deploy. wsdd (Note: The above command is case sensitive) • Run the Web Service Client java <webservicename>Client Note: The Web Service Client is just a sample and is not intended to be used in a production environment © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 20
Review • What is a Web Service? Web based component accessible on the internet or intranet • Technical Requirements Apache-Axis 1. 0 or greater, Tomcat 4. 1. 24, J 2 SDK 1. 5 • Web Server Setup Place Axis under Tomcat, set up the environment variables • Using the Wizard Select operations, specify app server info, deployment options • Testing the Web Service Edit client, run Tomcat, publish web service, run client © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 21
Questions © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 22
Demo © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 23
Glossary of Terms • XML - Extensible Markup Language http: //www. w 3 schools. com/xml/default. asp • SOAP - Simple Object Access Protocol http: //www. w 3 schools. com/soap/default. asp • SOA - Service Oriented Architecture http: //www. sun. com/products/soa/index. jsp? cid=142157 • XSD - XML Schema Definition http: //www. w 3 schools. com/schema/default. asp • WSDL - Web Service Description Language http: //www. w 3 schools. com/wsdl/default. asp • WSDD - Web Service Deployment Description © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 24
Testing the Web Service: Example Command to publish the Web Service Testing the Web Service by running the Web Service client © 2004 Computer Associates International, Inc. (CA). All trademarks, trade names, services marks and logos referenced herein belong to their respective companies. 25
- Slides: 25