DOC PREVIEW
CMU ISM 95702 - Understanding SOAP

This preview shows page 1-2-3-4-5-6-7-46-47-48-49-50-51-93-94-95-96-97-98-99 out of 99 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 99 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Understanding SOAP.NET Web ServicesJava (Apache Axis) Web ServicesUniversal Description, Discovery and Integration (UDDI) OverviewToday’s TopicXML OVER HTTP (Understanding SOAP)Slide 7Request and Response MessagesSlide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40Slide 41Slide 42Slide 43Slide 44Slide 45Slide 46Slide 47Slide 48Slide 49Slide 50Slide 51Slide 52Slide 53Slide 54Slide 55Slide 56Slide 57Slide 58Slide 59Slide 60Slide 61Slide 62Slide 63Slide 64Slide 65Slide 66Slide 67Slide 68Slide 69Slide 70Slide 71Slide 72Slide 73Slide 74Slide 75Slide 76Slide 77Slide 78Slide 79Slide 80Slide 81Slide 82Slide 83Slide 84Slide 85Slide 86Slide 87Slide 88Slide 89Slide 90Slide 91Slide 92Slide 93Slide 94Slide 95Slide 96Slide 97Slide 98HomeworkOCT 1Understanding SOAP• Homework 3 Demos• SOAP in the UDDI framework• An example database query Web Service • HomeworkOCT 2.NET Web ServicesWeb ServiceBrowserBrowserTest and LearnWSDL = Web Services Description LanguageWSDL.EXEProxy code to handlecommunications and marshalling Of parametersOCT 3Java (Apache Axis) Web ServicesWeb ServiceBrowserBrowserTest and LearnWSDL = Web Services Description Languagewsdl2javaProxy code to handlecommunications and marshalling of parametersOCT 4Universal Description, Discovery and Integration (UDDI) Overview Service ProviderWSDL Description of serviceSOAP ServiceUDDI RegistryWSDL Description of serviceSOAP clientService ClientSOAP DocumentThis slide adapted fromPage 353 of “Java and XML”By McLaughlinCodesSearches forGeneratesInteracts withRegistersAuthors CodesFindsHPIBMMicrosoftOCT 5Today’s TopicService ProviderWSDL Description of serviceSOAP ServiceUDDI RegistryWSDL Description of serviceSOAP clientService ClientSOAP DocumentThis slide adapted fromPage 353 of “Java and XML”By McLaughlinCodesSearches forGeneratesInteracts withRegistersAuthors CodesFindsHPIBMMicrosoftOCT 6XML OVER HTTP(Understanding SOAP)We’ll look at a client that communicates with an HTTP serverby using XML. This example is from an article entitled “XML ThroughThe Wall” by Daniel Nehren. It appears in the April/May 2001 edition of XML Magazine. The code is availableonline at www.xmlmag.com (XM0102DN).OCT 7DBServiceClient• built with a URL• will accept sql statements• will return result sets• makes use of HTTPServiceClient• makes use of DBServiceRequestHTTPServiceClient• knows about HTTP• works with generic requests• knows how to handle sockets and URL’s• returns generic responsesHTTPServiceHandler• Generic methods needed by all specific handlers• Knows HTTP • Knows about generic responsesDBHandler• Knows how to handle database queries, resultsets, and database responsesServlet• Takes a generic request• Examines request type• Dynamically loads appropriate handlerOCT 8Request and Response Messages Request DocumentResponse DocumentOCT 9package httpservice; // DBServiceClient.javapublic class DBServiceClient{ private Vector resultSet; private String serviceURL; public static void main(String[] args) { String serviceURL = "http://localhost:8080/servlet/httpservice.HttpService"; // Request a service// from a servlet.// In this case the service// is a database query.// Hold the retrieved ResultSet// in a Vector of Vectors.OCT 10try { DBServiceClient serviceClient = new DBServiceClient(serviceURL); serviceClient.executeSQLStatement("SELECT * FROM TABLE"); System.out.println(serviceClient.getResultSet()); } catch(Exception ex) { System.out.println("something went wrong: " + ex.getMessage()); ex.printStackTrace(System.err); } } public DBServiceClient(String serviceURL) { this.serviceURL = serviceURL; } public Vector getResultSet() { return resultSet; } // Create the DBService// Client with a URL.// Give it the SQL// and tell it to execute.// Ask for its result set.OCT 11public void executeSQLStatement(String statement) throws Exception { HttpServiceClient client = new HttpServiceClient(serviceURL); DBServiceRequest request = new DBServiceRequest(); request.setSqlStatement(statement); DBServiceResponse response = new DBServiceResponse(client.executeRequest(request)); resultSet = response.getResultSet(); } }// The DBServiceClient passes a// DBServiceRequest to an// HtpServiceClient.OCT 12/** HTTPServiceClient.java * Title: <p> * Description: <p> * Copyright: Copyright (c) Daniel Nehren<p> * Company: Openport Technology Inc.<p> * @author Daniel Nehren * @version 1.0 */package httpservice;import java.net.*;import java.util.*;import java.io.*;import org.w3c.dom.*;import org.apache.xerces.parsers.DOMParser;import org.apache.xerces.*;import org.xml.sax.InputSource;OCT 13// This class encapsulates all the interaction with an HttpService public class HttpServiceClient{ private static final String HTTP_VERSION = "1.0"; private static final String HTTP_POST_REQUEST = "POST"; private static final String HEADER_HOST = "Host"; private static final String HEADER_CONTENT_TYPE = "Content-Type"; private static final String XML_MIME_TYPE = "text/xml"; private static final String HEADER_CONTENT_LENGTH = "Content-Length"; private static final int DEFAULT_PORT = 80;OCT 14 private String serviceUrl; // URL of server private int returnCode; // From server private String returnMessage; // From server private Reader responsePayload; // From server public HttpServiceClient( String serviceUrl) { this.serviceUrl = serviceUrl; } public ServiceResponse executeRequest(ServiceRequest request) throws HttpServiceException { try //executeRequest takes//a ServiceRequest. A DBService//Request “is a” ServiceRequest.//It returns a ServiceResponse.OCT 15 { // Take the request from the ServiceRequest object String data = request.serializeRequestToString("utf-8"); // Send HTTP headers and the request to the servlet. // The HTTP headers are


View Full Document

CMU ISM 95702 - Understanding SOAP

Documents in this Course
Homework

Homework

12 pages

Lecture

Lecture

25 pages

Lecture

Lecture

21 pages

Lecture

Lecture

24 pages

Exam

Exam

11 pages

Homework

Homework

16 pages

Homework

Homework

38 pages

lecture

lecture

38 pages

review

review

7 pages

lecture

lecture

18 pages

review

review

8 pages

Chapter2

Chapter2

32 pages

Lecture 4

Lecture 4

47 pages

Lecture

Lecture

22 pages

Naming

Naming

26 pages

lecture

lecture

34 pages

lecture

lecture

42 pages

lecture

lecture

112 pages

Lecture

Lecture

33 pages

Axis

Axis

43 pages

lecture

lecture

32 pages

review

review

17 pages

Lecture

Lecture

53 pages

Lecture

Lecture

80 pages

Lab

Lab

14 pages

Load more
Download Understanding SOAP
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Understanding SOAP and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Understanding SOAP 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?