CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet...

54
CERN IDS

Transcript of CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet...

Page 1: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Page 2: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERN – European Organization for Nuclear Research

Administrative Support - Internet Development Services

Implementing Soap & Web ServicesImplementing Soap & Web Services

By Jozef Dranseld (ST-MA) &

Derek Mathieson (AS-IDS)

Page 3: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Presentation RoadmapPresentation Roadmap

Past

Future

Present

Page 4: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Why Web Services?Why Web Services?

““The Web can grow significantly in power and scope The Web can grow significantly in power and scope if it is extended to support communication between if it is extended to support communication between applications, from one program to another.”applications, from one program to another.”

- From the W3C XML Protocol Working Group Charter

Page 5: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

The HypeThe Hype

New paradigm?Reason to move platforms?Replacement for EDI?

Page 6: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Plateau ofproductivity

Slope of enlightenment

Trough of disillusionment

Peak of inflated

expectationsTechnology

trigger

Gartner’s ‘Hype’ CurveGartner’s ‘Hype’ CurveKey: Time to “plateau”

Less than two yearsTwo to five yearsFive to 10 yearsBeyond 10 years

Biometrics Grid Computing

Web Services

Nanocomputing

Personalfuel cells

Text-to-speech

WirelessLANs/802.11

Virtualprivatenetworks

Visibility

Maturity

Source: Gartner Group June 2002

Natural-language search

Identity services

Personal digitalassistant phones

E-tags

Speech recognition incall centers

Voice over IP

Bluetooth

Public key infrastructure

Speech recognition on desktopsLocationsensing

WAP/WirelessWeb

Peer-to-peercomputing

Page 7: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

What are Web Services?What are Web Services?

Identified by a URIInterfaces defined using XMLCan be discovered by other systemsInteract using XML based messages

conveyed by Internet protocols

Source: Web Services Glossary

Page 8: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

What are Web Services?What are Web Services?

XML

Application 2Application 1

Page 9: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

Is this New?Is this New?

CERNIDS

Page 10: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

A Brief History …A Brief History …

Page 11: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Is this Different?Is this Different?

Platform neutralOpen Standards

– InteroperableBased on ubiquitous software

– XML Parsers– HTTP Server

Page 12: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

The ComponentsThe Components

Page 13: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

TransportTransport

HTTP POST is most commonBut other protocols such as

– FTP– SMTP– HTTP GET

And other exotic ones:– Jabber– BEEP

Page 14: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Packaging – SoapPackaging – Soap

Used to mean – Simple– Object– Access– Protocol

From SOAP 1.2 > SOAP is no longer an acronym

Two Types of SOAP

Page 15: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Packaging – SoapPackaging – Soap

SOAP RPC:– encode and bind data structures into xml.– encode an RPC call

Page 16: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

SerializationSerialization

class PurchaseOrder {

String item = “socks”;

int amount = 1;

}

<PurchaseOrder>

<item type=“xsd:string”>

socks

</item>

<amount type=“xsd:int”>

1

</amount>

</PurchaseOrder>

Serializer

Page 17: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Packaging - SOAPPackaging - SOAP

SOAP ‘document style’– packages xml in an envelope

Page 18: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Packaging – SoapPackaging – Soap

HTTP Post

SOAP Envelope

SOAP Body

SOAP Head

Page 19: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Packaging – SoapPackaging – Soap

<s:Envelope xmlns:s=“URN”>

<s:header>

<s:transaction xmlns:m=“soap-transaction”>

<m:transactionID>

1234 </m:transactionID

>

</s:transaction>

</s:header>

Page 20: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Packaging – SoapPackaging – Soap

<s:Body>

<n:purchaseOrder xmlns:n=“URN”>

<n:item>socks</n:item>

<n:amount>1</n:amount>

</n:purchaseOrder>

</s:Body>

</s:Envelope>

Page 21: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Description – WSDLDescription – WSDL

Web Services Description Language“Web Services Description Language

(WSDL) provides a model and an XML format for describing Web services.” w3c.org

Page 22: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Description – WSDLDescription – WSDL

Messages

Types

Operations

Encoding

Endpoint

Page 23: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

TypesTypes

<types>

<schema targetNamespace=" IMessageService.xsd"

xmlns="…/XMLSchema" xmlns:SOAPENC="…/soap/encoding/"/>

</types>

Page 24: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

MessagesMessages

<message name=“purchase">

<part name=“item" type="xsd:string"/>

<part name=“quantity" type="xsd:integer"/>

</message>

Page 25: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

OperationsOperations

<operation name="setMessage">

<input name="setMessageRequest“ message="tns:setMessageRequest"/>

<output name="setMessageResponse“ message="tns:setMessageResponse"/>

</operation>

Page 26: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

EncodingEncoding

<soap:operation soapAction="" style="rpc"/>

<input name="setMessage0Request">

<soap:body use="encoded" namespace="MessageService" encodingStyle="…/soap/encoding/"/>

</input>

Page 27: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

EndpointEndpoint

<service name="MessageService">

<port name="MessageServicePort" binding="tns:MessageServiceBinding">

<soap:address location="http://localhost:8080/setMessage/"/>

</port>

</service>

Page 28: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Discovery – UDDIDiscovery – UDDI

Universal Description, Discovery and Integration

A UDDI Server acts as a registry for Web Services and makes them searchable.

Page 29: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Discovery – UDDIDiscovery – UDDI

Demonstration:

https://uddi.ibm.com/ubr/registry.html

Page 30: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Discovery – UDDIDiscovery – UDDI

UDDI RegistryInquiry

Publish

Page 31: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Discovery – UDDIDiscovery – UDDI

UDDI RegistryInquiry

Publish

Page 32: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

ExamplesExamples

Java– Client– Server

VBScript– Client –high level API– Client – low level API

.NET– C# Client– C# Server

Page 33: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Design RecommendationsDesign Recommendations

Create a local classCreate a method with the same name

Page 34: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (Java Client)Examples (Java Client)

URL endpointURL = new URL(endpoint);

Call call = new Call();

call.setSOAPTransport(m_httpconn);

call.setTargetObjectURI("MessageService");

call.setMethodName("setMessage");

call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

Page 35: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (Java Client)Examples (Java Client)

Vector params = new Vector();params.addElement(new Parameter("name", java.lang.String.class, name, null));

params.addElement(new Parameter("colour", java.lang.String.class, colour, null));

call.setParams(params);Response response = call.invoke(endpointURL, "");

Page 36: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (Java Client)Examples (Java Client)

Demonstration

Page 37: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (Java Server)Examples (Java Server)

A Web service Server is simple:– New class with method

Then:– Register class with soap router– Or– Place the source code in a jws file

Page 38: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (VB Client)Examples (VB Client)

High Level API (After adding a Web Service Reference)

Dim serv As clsws_MessageService

Set serv = New clsws_MessageService

serv.wsm_setMessage txtName.Text, txtColor.Text

Page 39: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (VB Client)Examples (VB Client)

Serializer.Init Connector.InputStreamSerializer.startEnvelope , ENC

Serializer.SoapNamespace "xsi", XSISerializer.SoapNamespace "SOAP-ENC", ENCSerializer.SoapNamespace "xsd", XSDSerializer.startBody

Serializer.startElement Method, URI, , "method"

Serializer.startElement “parameter“Serializer.SoapAttribute "type", ,

"xsd:string", "xsi"Serializer.writeString usernameSerializer.endElement

Serializer.endBodySerializer.endEnvelope

Connector.EndMessage

Page 40: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (VB Client)Examples (VB Client)

Call Web Service

Name

Colour

Page 41: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (C# Client)Examples (C# Client)

Add a Web References to a project

Localhost.MessageService serv = new Localhost.MessageService();

serv.setMessage(x, y);

Page 42: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (C# Client)Examples (C# Client)

Demonstration

Page 43: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Examples (C# Server)Examples (C# Server)

public class Demo : System.Web.Services.WebService {

public Demo() { InitializeComponent();

}

[Web Method]public string HelloWorld() {

return “Hello World”;}

}

Page 44: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

Web ServicesWeb ServicesFutureFuture

CERNIDS

Page 45: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

SecuritySecurity

Bookstore

Client Application

Page 46: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

SecuritySecurity

Client Application

Bookstore

Bank

Warehouse

Page 47: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

WS Security StandardisationWS Security Standardisation

W3C - http://www.w3c.org – XML Encryption– XML Digital Signatures

WS-I - http://www.ws-i.org– WS Security Profile

OASIS - http://www.oasis-open.org– WS-Security – SAML - Security Assertion Markup Language– XACML - Extensible Access Control Markup

Language– XKMS - XML Key Management Specification

Page 48: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Fire WallFire Wall

Security – Fire WallsSecurity – Fire Walls

Bookstore

Client Application

Page 49: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

WS-IWS-I

Web Services Interoperability Organization

http://www.ws-i.org

R1017 A RECEIVER MUST NOT mandate the use of the xsi:type attribute in messages except as required in order to indicate a derived type

WS-I Basic Profile Version 1.0

Page 50: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Missing PiecesMissing Pieces

Security– Single Sign-on, credentials

TransactionsQuality of service

– Timeliness guaranteesAsynchronous operations

– Co-ordination, workflow

Page 51: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Real ExamplesReal Examples

Amazon Web Services APIGoogle Web APIHP & IBM online stores

Page 52: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Next StepsNext Steps

Overtime InterfaceOther documents (Materials Request,

TID, Transport Request)E-Business – with ebXML

Page 53: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Plateau ofproductivity

Slope of enlightenment

Trough of disillusionment

Peak of inflated

expectationsTechnology

trigger

Gartner’s ‘Hype’ CurveGartner’s ‘Hype’ CurveKey: Time to “plateau”

Less than two yearsTwo to five yearsFive to 10 yearsBeyond 10 years

Web Services

Visibility

Maturity

Source: Gartner Group June 2002

Page 54: CERN IDS. CERN – European Organization for Nuclear Research Administrative Support - Internet Development Services Implementing Soap & Web Services By.

CERNIDS

Thank you Thank you

Presentation and source code of demos:

http://ais.cern.ch/presentations