WSTK Development toolkit for Java Implementation of Web Services By Keping Jia.

Slides:



Advertisements
Similar presentations
웹 서비스 개요.
Advertisements

18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
TSpaces Services Suite: Automating the Development and Management of Web Services Presenter: Kevin McCurley IBM Almaden Research Center Contact: Marcus.
UDDI v3.0 (Universal Description, Discovery and Integration)
General introduction to Web services and an implementation example
Web Services Web Services are the basic fundamental building blocks of invoking features that can be accessed by an application program. The accessibility.
A1.1 Assignment 1 “Deploying a Simple Web Service”
Web Services Technology Stack (WSDL and UDDI)
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
- Page 1 - VisualWorks Web Services 8/27/02 Version 1.0 Exp osin g Business Value with VisualWorks Web Services Kirk D. Blackburn Qwest Communications,
Distributed Heterogeneous Data Warehouse For Grid Analysis
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
3b.1 Web Services Part II Implementation details ITCS 4010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson, slides 3b version 0.1.
Lecture 10: Web Services. Outline Overview of Web Services Create a Web Service with Sun J2EE (JAX-RPC)
UDDI Ashish Jain University of Colorado 3 October, 2001.
Comparison of the RMI and the socket APIs
Web Services Description Language ?url=/library/en-us/dnwebsrv/html/understandWSDL.asp Notes from article.
Web Services Andrea Miller Ryan Armstrong Alex. Web services are an emerging technology that offer a solution for providing a common collaborative architecture.
Distributed Web Software  Presentation-based, e.g., dynamic web pages  Service-based – Web Services.
Livermore July Web Services Overview Francisco Curbera IBM T.J. Watson Research Center.
OOP IIICMU/MSCF1 Web Services Description Language ?url=/library/en-us/dnwebsrv/html/understandWSDL.asp Notes.
Distributed Web Software Presentation-based, e.g., dynamic web pages Service-based – Web Services.
1 Java Server Programming zLecture 1 focuses on: yIntroduction to web services y Web Services using Axis y The bigger Picture: Introduction to J2EE y Java.
Web services A Web service is an interface that describes a collection of operations that are network-accessible through standardized XML messaging. A.
Web Services CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Web Services (tying it all together) and Introduction to Grid Services Concepts These slides are adapted from course material developed by Barry Wilkinson,
WSTK Development toolkit for Java Implementation of Web Services By Keping Jia.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
Discovering E-Services Using UDDI in SELF-SERV Quan Z. Sheng, Boualem Benatallah, Rayan Stephan, Eileen Oi-Yan Mak, Yan Q. Zhu School of Computer Science.
Developing Web Services with the Eclipse Web Tools Platform Boris Minkin.
Cambridge, March 23 rd 2004 MobileMAN Project MobileMAN Project Web Service in Ad Hoc Network Veronica Vanni NETikos S.p.A.
COP 4991 Component Based Software Development Lecture #4 Java Web Services Onyeka Ezenwoye.
Web Service Addressing CS409 Application Services Even Semester 2007.
Outline  Enterprise System Integration: Key for Business Success  Key Challenges to Enterprise System Integration  Service-Oriented Architecture (SOA)
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Web Services Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
UDDI Jianguo Lu University of Windsor What is UDDI?  Universal Description, Discovery, and Integration  A project to encourage interoperability.
1 UDDI (Universal Description, Discovery, and Integration) An Overview – part II Version : Date : Pages Responsible Author : Co-Authors : Status : Confidentiality.
Web Services Based on SOA: Concepts, Technology, Design by Thomas Erl MIS 181.9: Service Oriented Architecture 2 nd Semester,
WebService. Outline Overview of Web Services SOAP (messaging) WSDL (service description) UDDI (registry)
Helsinki, June 7 th 2004 IAB Meeting MobileMAN Project Web Service in Ad Hoc Network Veronica Vanni NETikos S.p.A.
Service provider service requestor application object (client) application object (service provider) SOAP-based middleware SOAP messages exchanged on top.
XML and Web Services (II/2546)
- Page 1 - VisualWorks Web Services 8/27/02 Version 1.0 Exp osin g Business Value with VisualWorks Web Services Kirk D. Blackburn Qwest Communications,
CS603 Communication Mechanisms: SOAP 25 January 2002.
1 Java Remote Method Invocation java.rmi.* java.rmi.registry.* java.rmi.server.*
CP3024 Lecture 10 Web Services. What are Web Services?  “encapsulated, loosely coupled, contracted software objects offered via standard protocols” ZapThink.
Web Services Part 1 -- Qinwei Zhu Part 2 – Yongqun He.
WSDL : Web Service Definition Language Dr. Yuhong Yan NRC-IIT-Fredericton Internet logic.
Web services In this presentation… –what is a web service? –web service benefits –web service standards –web service definitions –web service actions.
UDDI (Universal Description, Discovery and Integration) Dr. SVL Narasimham.
Creating Web Services Presented by Ashraf Memon Presented by Ashraf Memon.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
An approach to Web services Management in OGSA environment By Shobhana Kirtane.
1 Web services for DIP LDIWG meeting C.H.Sicard 7 Jan 2003.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
Net-centric Computing Web Services. Lecture Outline  What is Web Service  Web Service Architecture  Creating and using Java Web Services  Apache Axis.
Designing software applications
Chapter 5 Remote Procedure Call
WEB SERVICES.
Wsdl.
Web services, WSDL, SOAP and UDDI
Introduction to Web Services
Distributed System using Web Services
Universal Description, Discovery and Integration (UDDI)
Distributed System using Web Services
Presentation transcript:

WSTK Development toolkit for Java Implementation of Web Services By Keping Jia

1.Intruduction Soap HTTP

Why? 1.Facilitate software integration ----Platform and language independent. WSDL,SOAP,XML ----Dynamic finding & binding UDDI 2.Comply with existing Internet infrastructure. ----SOAP over HTTP

Implementation practice 1.Abstract architecture client Web service deployment environment SOAP/HTTP binding 2.Implementation architecture client http parsersoap parser service implementation http 3.Java implementation architecture client web serverServlet Java class J2EE http soap private protocol

2. WSTK --- Web service tool kit 2.1 Composition

Client side

Service side

Example: public class jkpAdd { public int add(int a,int b) { return a+b; } 1.Compile jkpAdd.java 2. Creating jkpAdd WSDL Descriptions. There are two files that need to be created: (1) A service interface definition and (2) A service implementation definition.

Interface WSDL:

Service WSDL: Generating command: java -cp %WSTK_CP% org.apache.axis.wsdl.Java2WSDL -N -n -o c:\wstk-3.1\services\applications\jkpAdd\webapp\jkpAdd_Interface.wsdl -O c:\wstk-3.1\services\applications\jkpAdd\webapp\jkpAdd_Impl.wsdl -L " -m "add" -l jkpAdd

3.Deploying services (1) Creating the axis deployment descriptor (2) Deploying the service WAR with the WSTK configuration tool

3.Registering the service with Axis DEPLOY /jkpAdd/services/AdminService deploy.wsdd

Service publishing

More in detail ……

Example:

--- TModel

//Program example: import java.util.Vector; import com.ibm.uddi4j.wsdl.client.UDDIWSDLProxy; import com.ibm.uddi4j.wsdl.provider.ServiceProvider; import com.ibm.uddi4j.wsdl.axis.AxisServiceDefinition; import com.ibm.uddi4j.wsdl.definition.ServiceInterface; import org.uddi4j.util.CategoryBag; import org.uddi4j.util.KeyedReference; import com.ibm.wstk.uddi.TModelKeyTable; import com.ibm.wstk.WSTKConstants; public class NQPublish{ public static void main(String[] args) throws Exception { try { // // let's collect the input arguments // String serviceImplementationWSDL = args[0]; String serviceInterfaceWSDL = args[1]; // // this will use whatever UDDI registry you selected // in the WSTK Configuration Tool // UDDIWSDLProxy uwp = new UDDIWSDLProxy(WSTKConstants.UDDI_INQUIRY_URL, WSTKConstants.UDDI_PUBLISH_URL, WSTKConstants.UDDI_USERID, WSTKConstants.UDDI_CRED, WSTKConstants.TRANSPORT_CLASS);

// // assuming that you haven't yet registered yourself as // a Service Provider, do the following steps. If you // have already registered as a service provider, you // should use your existing registration // KeyedReference keyedReference = new KeyedReference(TModelKeyTable.UNSPSC, " "); keyedReference.setTModelKey(TModelKeyTable.UNSPSC_TMODEL_KEY); Vector keyedReferenceVector = new Vector(); keyedReferenceVector.add(keyedReference); // Create category bag CategoryBag spCatList = new CategoryBag(); spCatList.setKeyedReferenceVector(keyedReferenceVector); ServiceProvider sp = new ServiceProvider("WSTK 3.1 jkpAdd", "WSTK 3.1 jkpAdd", spCatList); sp = uwp.publish(sp); // // now we publish the service interface // ServiceInterface si = new ServiceInterface(serviceInterfaceWSDL); si = uwp.publish(si);

// // now we deploy and publish the service itself // keyedReference = new KeyedReference(TModelKeyTable.UNSPSC, " "); keyedReference.setTModelKey(TModelKeyTable.UNSPSC_TMODEL_KEY); keyedReferenceVector = new Vector(); keyedReferenceVector.add(keyedReference); // Create category bag CategoryBag sdCatList = new CategoryBag(); spCatList.setKeyedReferenceVector(keyedReferenceVector); // AxisServiceDefinition sd = new AxisServiceDefinition( serviceImplementationWSDL, sdCatList, serviceDeployment, serviceMgr); uwp.publish(sp, sd); //- publish the service } catch (Exception e) { System.out.println("There was an error (" + e + ")"); }

UDDI APIs tend to fall into four broad categories. 1. There are messages used to search for things such as businesses or services. These messages start with find_xxx where xxx is the name type of object you are searching for, e.g. find_business and find_service. Like any search mechanism, find messages let you specify search criteria such as names, categories and identifiers. When searching by names, you can specify a % sign as a wildcard character. 2.The second group of messages is the detail messages which follow the naming convention get_xxxDetail where xxx is the type of object for which you want detailed information. For example, get_businessDetail and get_tModelDetail return the details of a business and a tModel respectively. A get_xxxDetail message contains the unique identifier of the object for which you want detailed information. For example, get_businessDetail contains a businessKey while get_tModelDetail contains a tModelKey. 3.The third group is the save messages, e.g save_business and save_binding. These APIs can be used to save new objects or to replace existing objects. When saving new objects, the response message contains the newly saved object key. 4.Finally, the delete messages such as delete_business and delete_publisherAssertions, delete specified objects. Similar to get_xxxDetail messages, most delete messages also require a key that uniquely identifies the object to be deleted. Finding services in UDDI

Finding a Business by Name

Finding Businesses by Categories

Finding Service Interfaces

Finding Businesses by Service Interface

Finding Services by Name

Example: import java.util.Vector; import com.ibm.uddi4j.wsdl.client.UDDIWSDLProxy; import com.ibm.uddi4j.wsdl.definition.ServiceDefinition; import com.ibm.uddi4j.wsdl.provider.ServiceProvider; import com.ibm.wstk.wsdl.*; import com.ibm.wstk.*; public class NasdaqQuotesClient { public static String findUDDI(String service) throws Exception { try { UDDIWSDLProxy uwp = new UDDIWSDLProxy(WSTKConstants.UDDI_INQUIRY_URL, WSTKConstants.UDDI_PUBLISH_WSTK Constants.UDDI_USERID, WSTKConstants.UDDI_CRED, WSTKConstants.TRANSPORT_CLASS); Vector providerNameVector = new Vector(); providerNameVector.add(new Name("WSTK 3.1 jkpAdd")); ServiceProvider[] sps = uwp.findAllServiceProviders(null, providerNameVector, null,null,null,null,true); if (sps.length > 0) { ServiceDefinition sd = sps[0].getServiceDefinition(service); //service: jkpAdd return sd.getServiceImplementation().getWSDLFilename(); } else { return null; } } catch (Exception e) { System.out.println(e.getMessage()); System.exit(0); return null; }

2.2 WSTK structure