Oracl e Agile Engineering Data Management. Creating an Agile e6 WebService in JDeveloper 11g



Similar documents
Building and Using Web Services With JDeveloper 11g

Building an Agile PLM Web Application with JDeveloper and Agile 93 Web Services

BusinessObjects Enterprise XI Release 2

Developing Rich Web Applications with Oracle ADF and Oracle WebCenter Portal

Application. 1.1 About This Tutorial Tutorial Requirements Provided Files

Creating Web Services Applications with IntelliJ IDEA

DEVELOPING CONTRACT - DRIVEN WEB SERVICES USING JDEVELOPER. The purpose of this tutorial is to develop a java web service using a top-down approach.

Module 13 Implementing Java EE Web Services with JAX-WS

Query JD Edwards EnterpriseOne Customer Credit using Oracle BPEL Process Manager

QuadraMed Enterprise Scheduling Combined Service Installation Guide. Version 11.0

WA2087 Programming Java SOAP and REST Web Services - WebSphere 8.0 / RAD 8.0. Student Labs. Web Age Solutions Inc.

Publishing, Consuming, Deploying and Testing Web Services

NETWRIX CHANGE NOTIFIER

How to install and use the File Sharing Outlook Plugin

Bentley CONNECT Dynamic Rights Management Service

Tutorial on Building a web Application with Jdeveloper using EJB, JPA and Java Server Faces By Phaninder Surapaneni

Deploying Microsoft Operations Manager with the BIG-IP system and icontrol

Standard Client Configuration Requirements

JBoss SOAP Web Services User Guide. Version: M5

ADF Code Corner. 92. Caching ADF Web Service results for in-memory filtering. Abstract: twitter.com/adfcodecorner

HANDS-ON PRACTICE: DEPLOY AN APPLICATION

Using Internet or Windows Explorer to Upload Your Site

Dostek Remote Support Guide

HP Operations Orchestration Software

Java Web Services SDK

Changing Your Cameleon Server IP

Single-sign-on between MWS custom portlets and IS services

Monitoring Oracle Enterprise Performance Management System Release Deployments from Oracle Enterprise Manager 12c

ProperSync 1.3 User Manual. Rev 1.2

Creating XML Report Web Services

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

TAMUS Terminal Server Setup BPP SQL/Alva

Deploying the BIG-IP LTM system and Microsoft Windows Server 2003 Terminal Services

Witango Application Server 6. Installation Guide for Windows

Instructions for Configuring a SAS Metadata Server for Use with JMP Clinical

WhatsUp Gold v16.2 Installation and Configuration Guide

Oracle Technology Network Virtual Developer Day. Developing RIA Web Applications with Oracle ADF

Signup instructions for the End User

Table of Contents. 1. Content Approval...1 EVALUATION COPY

Windows Server Update Services 3.0 SP2 Step By Step Guide

Practice Fusion API Client Installation Guide for Windows

PC Agent Quick Start. Open the Agent. Autonomy Connected Backup. Version 8.8. Revision 0

Download and Installation Instructions. Java JDK Software for Windows

Oracle Service Bus Examples and Tutorials

Web Services API Developer Guide

Creating and Deploying Active Directory Rights Management Services Templates Step-by-Step Guide

T320 E-business technologies: foundations and practice

Business Process Management IBM Business Process Manager V7.5

WatchDox for Windows User Guide. Version 3.9.0

Quick Start Guide. Installation and Setup

ELM Server Exchange Edition Virtual Archive Mailbox version 5.5

Apache JMeter HTTP(S) Test Script Recorder

Virtual Office Remote Installation Guide

IBM WebSphere Adapter for PeopleSoft Enterprise Quick Start Tutorials

SQL Server 2005: Report Builder

Building Java Servlets with Oracle JDeveloper

WhatsUp Gold v16.1 Installation and Configuration Guide

Installing and Configuring vcloud Connector

NetBeans IDE Field Guide

Installing the Android SDK

Subscribe to RSS in Outlook Find RSS Feeds. Exchange Outlook 2007 How To s / RSS Feeds 1of 7

Supplement I.B: Installing and Configuring JDK 1.6

Personal Call Manager User Guide. BCM Business Communications Manager

Oracle SOA Suite 11g Oracle SOA Suite 11g HL7 Inbound Example

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

Don t get it right, just get it written.

Supplement I.B: Installing and Configuring JDK 1.6

Oracle Hyperion Financial Management Custom Pages Development Guide

Outlook Profile Setup Guide Exchange 2010 Quick Start and Detailed Instructions

Create a Web Service from a Java Bean Test a Web Service using a generated test client and the Web Services Explorer

Setting Oracle Passwords for the EDW

P R O V I S I O N I N G O R A C L E H Y P E R I O N F I N A N C I A L M A N A G E M E N T

WatchDox for Mac User Guide

All other trademarks are property of their respective owners.

Lab Introduction to Web Services

BlueJ Teamwork Tutorial

FEC Secure IPSec Client

MyNetFone Virtual Fax. Virtual Fax Installation

Using Adobe Dreamweaver CS4 (10.0)

BSDI Advanced Fitness & Wellness Software

Oracle Web Service Manager 11g Field level Encryption (in SOA, WLS) March, 2012

CA Spectrum and CA Embedded Entitlements Manager

Throughout this document, you will be instructed to log in as user Ann, or as user Julia. Log in using the user name assigned to you.

Contents About the Contract Management Post Installation Administrator's Guide... 5 Viewing and Modifying Contract Management Settings...

Dell Statistica Document Management System (SDMS) Installation Instructions

To begin, visit this URL:

SSL Intercept Mode. Certificate Installation Guide. Revision Warning and Disclaimer

Producing Standards Based Content with ToolBook

Wavecrest Certificate

CRM Migration Manager for Microsoft Dynamics CRM. User Guide

Installing and Configuring vcloud Connector

Oracle Hyperion Financial Management Developer and Customization Guide

Java Software Development Kit (JDK 5.0 Update 14) Installation Step by Step Instructions

Configuring your client to connect to your Exchange mailbox

HP Operations Orchestration Software

How to set up Outlook Anywhere on your home system

Editors Comparison (NetBeans IDE, Eclipse, IntelliJ IDEA)

1. Tutorial Overview

MadCap Software. Upgrading Guide. Pulse

Transcription:

Oracl e Agile Engineering Data Management Creating an Agile e6 WebService in JDeveloper 11g Andre Guldi Agile PLM Product Management Or acl e Germany September 2009

CONTENTS Getting started... 2 Step 1 Setting up JDeveloper...2 Exercise... 2 Creating an Agile e6 WebService in JDeveloper 11g... 3 Step 1: Creating a New Application and Project...3 Exercise... 3 Step 2 : Add a Plain Old Java Object (POJO) to contain the Web Service Method...5 Exercise... 5 Step 3: Test the Web Service... 14 Exercise... 14 Oracle Agile Engineering Data Management Chapter 1-1

Creating an Agile e6 WebService in JDeveloper 11g. Getting started In this tutorial you will learn how to create your own custom Web Services for accessing and retrieving data inside Agile e6 using Oracle JDeveloper 11g and ADF (Application Development Framework) components. Note Note that samples are provided for guidance only and should be tested in a development system before being applied on a production system. The sample code is not supported. Step 1 Setting up JDeveloper Note The examples below are based on Version 11g of JDeveloper and Agile EDM Version e6.1. The code fragments and library names may differ for older versions of Agile EDM! Exercise 1. Download Oracle JDeveloper 11g from the Oracle Technology Network (http://www.oracle.com/technology/index.html) 2. Install Oracle JDeveloper 11g as described in the Installation Manual on Oracle Technology Network - http://download.oracle.com/docs/cd/e12839_01/install.1111/e13666/toc.htm 3. After you have installed Oracle JDeveloper 11g on your computer, select Start > All Programs > Oracle WebLogic > JDeveloper Studio 11.1.1.0.0 to open JDeveloper 4. If the Migrate User Settings dialog box opens, click NO. If prompted for a User Role, choose Default and click OK. 5. Close the Tip of the Day window. The JDeveloper IDE should now be displayed. Chapter 1-2

Creating an Agile e6 WebService in JDeveloper 11g.1 Chapter 1 Creating an Agile e6 WebService in JDeveloper 11g Note The examples below are based on Version 11g of JDeveloper and Agile EDM Version e6.1. The code fragments and library names may differ for older versions of Agile EDM! This chapter explains how to create an Agile e6 WebService in JDeveloper 11g: 1. Step: Creating a new application and project Exercise 2. Step: Add a Plain Old Java Object (POJO) to contain the Web Service Method Exercise 3. Step: Test the Web Service Exercise Step 1: Creating a New Application and Project Exercise 1. Select the Application Navigator tab and click New Application (alternatively, you can select File New to bring up the New Gallery, then select General Generic Application to create a new application.) 2. In the Create Application dialog box, set the application name to Agile_e6. Note Leave the Application Package Prefix property blank. Oracle Agile Engineering Data Management Chapter 1-3

Creating an Agile e6 WebService in JDeveloper 11g. 3. Click Next. 4. Name the default Project PlmWebServices. Each web service scenario will be created in its own project. This project will be used for the annotation web service scenario. 5. On the Project Technologies tab, shuttle Web Services from the Available list to the Selected list (this also selects the Java technology.) 6. Click Finish. The Application Navigator should look like this: Chapter 1-4

Creating an Agile e6 WebService in JDeveloper 11g.1 Step 2 : Add a Plain Old Java Object (POJO) to contain the Web Service Method In this section you create a plain Java class containing a method to return an input value with some text. The class is annotated to define it as a web service. It also contains an annotation to define the method as part of the web service. This section shows how to modify the method properties using the Code Editor, Property Inspector, and Structure window. Once compiled and deployed to the integrated server, the web service is then run using the HTTP Analyzer, which returns the result of the method. Exercise 1. Create the Java class from the Application Navigator. Right-click the Annotation project and select New. 2. In the New Gallery, select the General category, then select the Java Class item and click OK. Oracle Agile Engineering Data Management Chapter 1-5

Creating an Agile e6 WebService in JDeveloper 11g. 3. Name the class PlmService and set the Package to plmwebservices. The remaining properties can be left at their default. 4. Click OK to create the class and display it in the Code Editor. 5. Following the class definition in PlmService, add a method named getpartdescription() that accepts a Part ID string and returns the Part Description. Chapter 1-6

Creating an Agile e6 WebService in JDeveloper 11g.1 // =========================================================================== // Copyright 2009 Oracle Corporation <http://www.oracle.com/>. // All rights reserved. // // This file, which has been provided by Oracle Corporation as part of // an Oracle product for use ONLY by licensed users of the product, // includes CONFIDENTIAL and PROPRIETARY information of Oracle Corporation. // // USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS OF THE LICENSE // AGREEMENT AND LIMITED WARRANTY FURNISHED WITH THE PRODUCT. // // IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD ORACLE CORPORATION, ITS // RELATED COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY CLAIMS // OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR DISTRIBUTION OF // YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES ARISING OUT OF OR // RESULTING FROM THE USE, MODIFICATION, OR DISTRIBUTION OF PROGRAMS OR FILES // CREATED FROM, BASED ON, AND/OR DERIVED FROM THIS SAMPLE SOURCE CODE FILE. // =========================================================================== public String getpartdescription (String partid) { EciClient plmconnection = null; AxalantRepository plmrepository = null; String plmhosttest = "plm-server"; String plmporttest = "16087"; String plmenvtest = "plmref"; String plmusertest = "EDBCUSTO"; String plmpwdtest = "OTSUCBDE"; try { EciClient.setDefaultEncoding("8859_1"); EciClientParams plmclientparam = new EciClientParams(plmHostTest, plmporttest, plmusertest, plmpwdtest, plmenvtest, "SCOPE=PRIVATE" ); plmclientparam.setencoding("iso8859-1"); plmconnection = new EciClient(plmClientParam, 300000, 300000); } catch (UnsupportedEncodingException uee) { return ("Exception"); } plmrepository = (AxalantRepository) RepositoryFactory.getInstance().createRepository(plmConnection); AxalantEntity itementity = plmrepository.createaxalantentity("edb- ARTICLE"); EntityRecord myitem = (EntityRecord) itementity.getrecordlist("part_id", partid).get(0); String partdescription = myitem.getstring("t_master_dat.part_name_eng"); System.out.println("item is "+partdescription); if (plmconnection.isconnected()) plmconnection.close(); return "Description is " + partdescription; } Oracle Agile Engineering Data Management Chapter 1-7

Creating an Agile e6 WebService in JDeveloper 11g. Then add following Import statements at the beginning of the code: import com.agile.eci.eciclient; import com.agile.eci.eciclientparams; import com.agile.eci.eciconparams; import com.agile.er.entityrecord; import com.agile.er.record; import com.agile.er.axalant.axalantrepository; import com.agile.security.eciticket; import com.agile.er.repositoryfactory; import com.agile.er.axalant.axalantentity; import java.io.unsupportedencodingexception; 6. Save your work. Note You will get many error messages when pasting above source code because you are using the Agile e6 Java API, but the API libraries are still missing. So, next step is to provide the Java API libraries in JDeveloper: 7. In the project directory, add a directory libs and copy all relevant Java API libs into that directory: Chapter 1-8

Creating an Agile e6 WebService in JDeveloper 11g.1 8. Then you need to make JDeveloper aware of the new libraries. Go to the Project setttings and add these libraries for this project: 9. In the Project Properties, go to Libraries and Classpath and add the libraries which you copied to the libs directory before via the button Add JAR/Directory: Oracle Agile Engineering Data Management Chapter 1-9

Creating an Agile e6 WebService in JDeveloper 11g. Now all lines in your source code, which showed an error because of the missing libraries, should show normal and no compilation error should come up anymore. 10. While still in the class, add an @WebService annotation before the class definition. This annotation denotes that the class contains a method to be used by a web service. 11. In the margin, click the Quick Hint (light bulb icon) and select Configure project for web services. 12. In the Select Deployment Platform dialog box, ensure that Java EE 1.5, with support for JAX- WS Annotations is selected, and then click OK. Chapter 1-10

Creating an Agile e6 WebService in JDeveloper 11g.1 This step adds the javax.jws.webservice import statement to the Java class and creates a web.xml file. 13. Back in the class, create a second annotation before the getpartdescription() method. The annotation signifies this is the method to be exposed from the web service. Add a blank line above the getpartdescription() method, and start typing @WebMethod. A popup shows you the available syntaxes. Select WebMethod. Oracle Agile Engineering Data Management Chapter 1-11

Creating an Agile e6 WebService in JDeveloper 11g. 14. Add the import javax.jws.webmethod; statement. The class should look like the image below. 15. Save your work. You can use the Property Inspector to modify the characteristics of the class. In the menu bar, select View Property Inspector and it will open as a tab in the bottom portion of the IDE. Note: If the Property Inspector opens in a different part of the IDE, you can drag its tab and drop it on the bottom panel if you would rather work with it there. Chapter 1-12

Creating an Agile e6 WebService in JDeveloper 11g.1 16. To display the properties in the Property Inspector, select the Source tab at the bottom of the Structure window, then select the top level PlmService class name 17. The Property Inspector displays a few finger tabs on the left side of the window (these could be expandable headings if the Property Inspector window is large enough.) Select the Web Services tab and notice that the Service Name has the word 'Service' appended to the class name. If you don't want to have the service named "PlmServiceService", you can change it, Oracle Agile Engineering Data Management Chapter 1-13

Creating an Agile e6 WebService in JDeveloper 11g. and the class reflects the change. 18. Change the Service Name to PlmService and save your work. In the Code Editor you can see that the @WebService annotation updated to reflect the new service name. Conversely, changes in the Code Editor, are synchronized in the Property Inspector. This functionality is available at the method level, too. You now have a class, defined as a web service, that contains an exposed method. In the next section you test the web service. Step 3: Test the Web Service In this section you compile, deploy and test the web service. The HTTP Analyzer is the testing mechanism for web services. When you use the HTTP analyzer to test web services, the service is compiled and deployed to the integrated server. The analyzer is then invoked, enabling you to send and receive values from the web service. Exercise 1. Before testing the web service, check that your web browser settings are correct. Chapter 1-14

Creating an Agile e6 WebService in JDeveloper 11g.1 1. Choose Tools > Preferences and then scroll down the list on the left to select the Web Browser and Proxy page. 2. Ensure that the Use HTTP Proxy Server check box is not selected, then click OK. 2. In the Application Navigator, right-click the PlmService.java node and in the context menu, select Test Web Service. This option invokes the integrated server, deploys the service and then starts the analyzer. It may take a few seconds to start the integrated server if it is being run for the first time. If this is the first time you test a service, Windows may ask you about blocking content. Allow the content to be displayed. 3. The top portion of the HTTP Analyzer editor window displays the URL for the web service, the WSDL URL, and the exposed Operations. The bottom portion of the analyzer is split into two areas: Request and Response. The request area shows all the arguments from the exposed method. When the web service is executed, the Response area shows the results. Oracle Agile Engineering Data Management Chapter 1-15

Creating an Agile e6 WebService in JDeveloper 11g. 4. In the Request area, enter <part id> in the arg0 field. 5. In the top area of the analyzer, click Send Request, or click the Send Request button below the argument. The analyzer sends the request to the service, and after a few seconds the return parameter is displayed at the bottom of the Response area, which is the Description of respective part, which we send to the Web Service as input parameter Chapter 1-16