ClaRA web services V. Gyurjyan Clas12 Software Meeting 03.10.2008.

Slides:



Advertisements
Similar presentations
Apache Tomcat as a container for Servlets and JSP
Advertisements

 2002 Prentice Hall. All rights reserved. Chapter 9: Servlets Outline 9.1 Introduction 9.2 Servlet Overview and Architecture Interface Servlet and.
Servlets. A form The HTML source Chapter 1 Please enter your name and password then press start Name: Password: In Netbeans you can graphically create.
Servlets and JDBC. Servlets A form The HTML source Chapter 1 Please enter your name and password then press start Name: Password:
Objectives Ch. D - 1 At the end of this chapter students will: Know the general architecture and purpose of servlets Understand how to create a basic servlet.
Servlets Stoney Jackson
An introduction to Java Servlet Programming
18-Jun-15 JSP Java Server Pages Reference: Tutorial/Servlet-Tutorial-JSP.html.
JSP Java Server Pages Reference:
June 1, 2000 Object Oriented Programming in Java (95-707) Advanced Topics 1 Lecture 10 Object Oriented Programming in Java Advanced Topics Servlets.
Servlets. A form The HTML source Chapter 1 Please enter your name and password then press start Name: Password: In Netbeans you can graphically create.
Core Servlets Chapter 3 Link for Core Servlets code: om/archive/ om/archive/
Servlets. A form The HTML source Chapter 1 Please enter your name and password then press start Name: Password:
Introduction to Servlet & JSP
Comp2513 Java Servlet Basics Daniel L. Silver, Ph.D.
Servlets. Our Project 3-tier application Develop our own multi-threaded server Socket level communication.
Java Servlet. What is Java Servlet? A Servlet is a java based server side web technology. It is a java class that serves a client request and receives.
CSCI 6962: Server-side Design and Programming History and Background.
Java Servlets and JSP.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Li Tak Sing COMPS311F. A web page that counts the number of times that you have visited the page. You can try the page at:
Examples of Using Servlets and JSP Representation and Management of Data on the Internet.
Servlets. - Java technology for Common Gateway Interface (CGI) programming. - It is a Java class that dynamically extends the function of a web server.
Chapter 5 Java Servlets. Objectives Explain the nature of a servlet and its operation Use the appropriate servlet methods in a web application Code the.
Java Servlets and Java Server Pages Carol Wolf Computer Science.
J2EE training: 1 Course Material Usage Rules PowerPoint slides for use only in full-semester, for-credit courses at degree-granting.
Li Tak Sing COMPS311F. Static attributes in Servlets Since Servlets are also Java classes, you can also use static attributes to store values that can.
111 Java Servlets Dynamic Web Pages (Program Files) Servlets versus Java Server Pages Implementing Servlets Example: F15 Warranty Registration Tomcat Configuration.
DataBases and SQL INFSY 547 Spring Course Wrap Up April 12: Complete Work on Servlets Review of Team Projects Close of Portfolio Work April 19:
CMPUT 391 – Database Management Systems Department of Computing Science University of Alberta CMPUT 391 Database Management Systems Web based Applications,
Web Server Programming 1. Nuts and Bolts. Premises of Course Provides general introduction, no in-depth training Assumes some HTML knowledge Assumes some.
Servlet Lifecycle Lec 28. Servlet Life Cycle  Initialize  Service  Destroy Time.
Java Servlets Outline 24.1 Introduction 24.2 Servlet Overview and Architecture Interface Servlet and the Servlet Life Cycle HttpServlet Class.
Mark Dixon 1 09 – Java Servlets. Mark Dixon 2 Session Aims & Objectives Aims –To cover a range of web-application design techniques Objectives, by end.
Java Servlets Lec 27. Creating a Simple Web Application in Tomcat.
Servlet Communication Other Servlets, HTML pages, objects shared among servlets on same server Servlets on another server with HTTP request of the other.
Chapter 2 Web app architecture. High-level web app architecture  When a client request coming in and needs servlet to serve dynamic web content, what.
CS 160: Software Engineering September 3 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
20-Nov-15introServlets.ppt Intro to servlets. 20-Nov-15introServlets.ppt typical web page – source Hello Hello.
S ERVLETS Hits Counter 21-Nov-15. S ERVLETS - H ITS C OUNTER Many times you would be interested in knowing total number of hits on a particular page of.
Top right corner for field-mark, customer or partner logotypes. See Best practice for example. Slide title 40 pt Slide subtitle 24 pt Text 24 pt Bullets.
Java Servlets and Java Server Pages Norman White Stern School of Business.
JSP Pages. What and Why of JSP? JSP = Java code imbedded in HTML or XML –Static portion of the page is HTML –Dynamic portion is Java Easy way to develop.
 2002 Prentice Hall. All rights reserved. 9.8 Multi-Tier Applications: Using JDBC from a Servlet Three-tier distributed applications –User interface –Business.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, Responds oriented other.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
Mark Dixon 1 11 – Java Servlets. Mark Dixon 2 Session Aims & Objectives Aims –To cover a range of web-application design techniques Objectives, by end.
CS320 Web and Internet Programming Introduction to Java Servlets Chengyu Sun California State University, Los Angeles.
Vakgroep Informatietechnologie – Onderzoeksgroep (naam) Web Centric Design of Distributed Software.
Session Beans Based on: Patel, Brose, Silverman, Mastering Enterprise JavaBeans 3.0.
Configuration Web Server Tomcat - Install JDK Install Tom cat Configure Tom cat for running Servlet C:\Program Files\Apache Software Foundation\Tomcat.
©SoftMoore ConsultingSlide 1 Overview of Servlets and JavaServer Pages (JSP)
Java and the Web CSE 3330 Southern Methodist University.
Java Servlets and Java Server Pages
Introduction To HTML Dr. Magdi AMER. HTML elements.
How CGI and Java Servlets are Run By David Stein 14 November 2006.
J2EE/Java EE Apache Tomcat v9 IBM Websphere v8 Redhat JBoss EAP v6 Oracle Weblogic v12 Fusion Web Tier ServletsJSPJSF Business Tier JMXJMSEJB.
S ERVLETS Form Data 19-Mar-16. F ORM P ROCESSING You must have come across many situations when you need to pass some information from your browser to.
Introduction to Servlets
Building Web Apps with Servlets
Servlet Fudamentals.
Servlets Hits Counter 20-Jul-18.
HTTP Servlet Overview Servlets are modules that extend request/response-oriented servers, such as Java-enabled web servers. For example, a servlet might.
V. Gyurjyan Clas12 Software Meeting
In Class Assg 4 - Solution
In Class Assg 3 - Solution
Servlets and Java Server Pages
J2EE Lecture 1:Servlet and JSP
Basic servlet structure
Java Chapter 7 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

ClaRA web services V. Gyurjyan Clas12 Software Meeting

Geometry services cMsg ServiceWeb Service User cMsg TCP port = 7788 SOAP HTTP Port = 8080 Geometry

Java Client Application package geometryws_client_application; import javax.xml.ws.BindingProvider; /** gurjyan */ public class Main { /** args the command line arguments */ public static void main(String[] args) { try { // Call Web Service Operation org.jlab.clara.ws.client.GeometryWSService service = new org.jlab.clara.ws.client.GeometryWSService(); org.jlab.clara.ws.client.GeometryWS port = service.getGeometryWSPort(); //change the wsdl location ((BindingProvider) port).getRequestContext().put( BindingProvider.ENDPOINT_ADDRESS_PROPERTY, " java.lang.String component = "SVT"; java.lang.String representation = "ascii"; // TODO process result here java.lang.String result = port.getGeometry(component, representation); System.out.println("Result = " + result); } catch (Exception ex) { ex.printStackTrace(); }

JSP client <%-- Document : index Created on : Mar 7, 2008, 10:55:19 AM Author : gurjyan --%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " JSP Page ClaRA GeometryService JSP client! <% try { org.jlab.clara.ws.client.GeometryWSService service = new org.jlab.clara.ws.client.GeometryWSService(); org.jlab.clara.ws.client.GeometryWS port = service.getGeometryWSPort(); // TODO initialize WS operation arguments here java.lang.String component = "SVT"; java.lang.String representation = "ascii"; // TODO process result here java.lang.String result = port.getGeometry(component, representation); out.println("Result = "+result); } catch (Exception ex) { // TODO handle custom exceptions here } %>

Servlet client package org.jlab.clara.ws.client; import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import javax.xml.ws.WebServiceRef; /** * gurjyan */ public class ClientServlet extends HttpServlet = " private GeometryWSService service; /** * Processes requests for both HTTP GET and POST methods. request servlet request response servlet response */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { out.println(" "); out.println(" Servlet ClientServlet "); out.println(" "); out.println(" Servlet ClientServlet at " + request.getContextPath () + " "); try { // Call Web Service Operation org.jlab.clara.ws.client.GeometryWS port = service.getGeometryWSPort(); java.lang.String component = "SVT"; java.lang.String representation = "ascii"; // TODO process result here java.lang.String result = port.getGeometry(component, representation); out.println("Result = "+result); } catch (Exception ex) {} out.println(" "); } finally { out.close(); }