SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Building	
  Web	
  Services	
  
Jussi	
  Pohjolainen	
  
Communica9on	
  between	
  Apps	
  
•  Implemen9ng	
  RPCs	
  can	
  be	
  a	
  difficult	
  task	
  
•  DCOM,	
  CORBA,	
  RMI	
  …	
  firewalls	
  and	
  proxy	
  
servers	
  can	
  block	
  binary	
  
•  Using	
  HTTP	
  for	
  RPCs	
  you	
  can	
  bypass	
  this	
  
problem	
  
Web	
  Service	
  
•  Communica9on	
  between	
  devices	
  over	
  Web	
  
– W3C	
  defines	
  "Web	
  Service"	
  as	
  a	
  technology	
  that	
  
uses	
  WSDL,	
  SOAP,	
  HTTP	
  and	
  XML	
  to	
  create	
  the	
  
communica9on	
  
•  Two	
  types	
  
– XML	
  Web	
  Services	
  
– Web	
  API	
  
XML	
  Web	
  Services	
  
•  XML	
  Web	
  services	
  uses	
  XML	
  messages	
  that	
  
follow	
  SOAP	
  standard	
  for	
  crea9ng	
  the	
  
communica9on	
  
•  Services	
  are	
  wriRen	
  using	
  WSDL	
  
– Web	
  Services	
  Descrip9on	
  Language	
  (WSDL)	
  
•  Web	
  Services	
  are	
  integrated	
  very	
  well	
  to	
  .NET	
  
and	
  Java	
  (6	
  -­‐>)	
  
Web	
  API	
  (Rest)	
  
•  Emphasis	
  to	
  simpler	
  communica9on	
  
– Representa)onal	
  state	
  transfer	
  (REST)	
  
•  Do	
  not	
  require	
  SOAP,	
  WSDL	
  
•  Simple	
  Web	
  API	
  
– hRp://www.something.com/twiRerthis.php?
msg=hello!	
  
•  If	
  the	
  Web	
  API	
  is	
  implemented	
  using	
  certain	
  
constraints,	
  it's	
  rest	
  API	
  
– hRp://www.something.com/clients/client17	
  
XML	
  WEB	
  SERVICE	
  
SOAP?	
  
•  SOAP	
  is	
  a	
  XML-­‐based	
  protocol	
  to	
  let	
  apps	
  
exchange	
  informa9on	
  over	
  HTTP	
  
•  SOAP	
  is	
  language	
  independent	
  and	
  it's	
  W3C	
  
recommenda9on	
  
•  Since	
  SOAP	
  is	
  XML	
  and	
  it's	
  text,	
  it	
  can	
  be	
  send	
  
easily	
  through	
  firewalls	
  
SOAP	
  Building	
  Blocks	
  
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Header>
...
</soap:Header>
<soap:Body>
...
<soap:Fault>
...
</soap:Fault>
</soap:Body>
</soap:Envelope>
SOAP	
  Request	
  
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/
envelope/" xmlns:ns1="http://hello/">
<SOAP-ENV:Body>
<ns1:getArea><arg0>5.6</arg0></ns1:getArea>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP	
  Response	
  
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getAreaResponse xmlns:ns2="http://hello/">
<return>98.5203456165759</return>
</ns2:getAreaResponse>
</S:Body>
</S:Envelope>
Client	
  and	
  Server	
  
•  "Soap	
  Server"	
  provides	
  a	
  WSDL	
  –	
  file	
  to	
  client	
  
•  Client	
  opens	
  the	
  WSDL	
  file	
  and	
  discovers	
  the	
  
methods	
  and	
  arguments	
  of	
  given	
  service	
  
•  Client	
  makes	
  a	
  invoca9on	
  to	
  server.	
  The	
  
invoka9on	
  is	
  a	
  soap	
  message	
  
•  Server	
  receives	
  the	
  soap	
  message,	
  parses	
  it	
  
and	
  invocates	
  the	
  method.	
  Result	
  is	
  send	
  back	
  
in	
  SOAP	
  envelope	
  
Java	
  6:	
  XML	
  &	
  Web	
  Services	
  
•  Easy	
  way	
  of	
  crea9ng	
  Web	
  Services	
  
•  Expose	
  web	
  service	
  with	
  a	
  simple	
  annota9on	
  
	
  
Web	
  Service	
  
package hello;
import javax.jws.WebService;
@WebService
public class CircleFunctions {
public double getArea(double r) {
return java.lang.Math.PI * (r * r);
}
public double getCircumference(double r) {
return 2 * java.lang.Math.PI * r;
}
}
Server	
  
package hello;
import javax.xml.ws.Endpoint;
class Publish {
public static void main(String[] args) {
Endpoint.publish(
"http://localhost:8080/circlefunctions",
new CircleFunctions());
}
}
Generate	
  Stub	
  Files	
  
•  Generate	
  stub	
  files:	
  
– wsgen –classpath . hello.CircleFunctions
PHP	
  Client	
  
<?php
$arguments = array (
"arg0" => "5.6",
);
// URI delivered to web service
$soapclient = new SoapClient("http://localhost:8080/
circlefunctions?wsdl");
$result = $soapclient->getArea($arguments);
print($result->return);
?>
REST	
  
REST	
  Constraints	
  
•  Client	
  Server	
  
–  Interface	
  separates	
  clients	
  from	
  servers.	
  Server	
  and	
  client	
  can	
  be	
  
replaced	
  and	
  developed	
  independently	
  
–  Client?	
  Browser,	
  PHP	
  script,	
  Desktop	
  app,	
  Command	
  line	
  …	
  
•  Statelessness	
  
–  Each	
  request	
  from	
  any	
  client	
  contains	
  all	
  the	
  informa9on	
  necessary	
  
•  Cacheable	
  
–  Clients	
  can	
  cache	
  responses.	
  Response	
  indicate	
  whether	
  it	
  is	
  cacheable	
  
or	
  not	
  
•  Uniform	
  interface	
  
–  Uniform	
  interface	
  between	
  clients	
  and	
  servers.	
  Four	
  guiding	
  principles	
  
•  Layered	
  System	
  
–  Client	
  does	
  not	
  know	
  is	
  it	
  connected	
  directly	
  to	
  server	
  or	
  some	
  
middleware	
  
Guidelines	
  for	
  the	
  Interface	
  
•  Iden9fica9on	
  of	
  resources	
  
–  Resources	
  are	
  iden9fied	
  via	
  request	
  using	
  URIs	
  
–  Server	
  sends	
  to	
  client	
  HTML,	
  XML	
  or	
  JSON	
  as	
  result	
  (does	
  not	
  send	
  the	
  
database)	
  
•  Manipula9on	
  of	
  resources	
  	
  
–  Client	
  can	
  delete	
  or	
  modify	
  a	
  resource	
  when	
  it	
  holds	
  a	
  representa9on	
  
of	
  the	
  resource	
  
•  Self-­‐descrip9ve	
  messages	
  
–  Message	
  includes	
  enough	
  informa9on	
  to	
  describe	
  how	
  to	
  process	
  the	
  
message	
  
•  Hypermedia	
  as	
  the	
  engine	
  of	
  applica9on	
  state	
  
–  Client	
  enters	
  REST	
  app	
  using	
  simple	
  fixed	
  URL.	
  All	
  future	
  ac9ons	
  the	
  
client	
  may	
  take	
  can	
  be	
  discovered	
  from	
  the	
  returned	
  representa9on	
  
Resources	
  
•  Resource	
  can	
  be	
  anything:	
  ar9cle,	
  comment,	
  
user	
  …	
  
•  Resources	
  are	
  accessed	
  by	
  URI	
  
– hRp://example.com/ar9cle/1	
  
– hRp://example.com/comments/	
  
RESTful	
  Web	
  APIs	
  
PHP	
  REST	
  IMPLEMENTATION	
  
Rewrite	
  engine	
  
•  Rewrite	
  engine	
  is	
  a	
  sohware	
  that	
  modifies	
  
web	
  URL's	
  appearance	
  
– URL	
  rewri9ng	
  
•  Usage	
  
– hRp://example.com/index.php?clien9d=123	
  
•  Can	
  be	
  altered	
  
– hRp://example.com/clients/client/123	
  
•  Apache	
  HTTP	
  Server	
  has	
  URL	
  rewri9ng	
  
provided	
  by	
  mod_rewrite	
  module	
  
.htaccess	
  
# Let's use the mod_rewrite module
RewriteEngine On
# Set's the base URL for per-directory rewrites
RewriteBase /
# Defines a condition under which rewriting will
# take place
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Make the rule
RewriteRule ^(.*)$ /xampp/rest/index.php/$1 [L]
XAMPP	
  windows	
  
•  Open	
  apache/conf/extra/hRpd-­‐xampp.conf	
  
– set	
  AllowOverride	
  All	
  
Gekng	
  info	
  about	
  Request	
  and	
  Path	
  
<?php
$requestMethod = $_SERVER['REQUEST_METHOD'];
print("Request method: " . $requestMethod . "nn");
$urlPaths = $_SERVER['REQUEST_URI'] ;
print("Path: " . $urlPaths);
?>
Modifica9on	
  
<?php
$requestMethod = $_SERVER['REQUEST_METHOD'];
$urlPaths = $_SERVER['REQUEST_URI'] ;
$paths = explode("/", $urlPaths);
$paths = array_splice($paths, 3);
print_r($paths);
?>
Encoding	
  and	
  decoding	
  
•  Encode	
  data	
  to	
  and	
  decode	
  from	
  JSON	
  
– json_encode()	
  
– json_decode()	
  
Tes9ng:	
  Advanced	
  REST	
  Client	
  Chrome	
  App	
  
Tes9ng	
  
•  PHP	
  Script	
  that	
  makes	
  hRp	
  requests	
  
•  CURL	
  
•  Telnet…	
  

Weitere ähnliche Inhalte

Was ist angesagt?

The constrained application protocol (coap) part 2
The constrained application protocol (coap)  part 2The constrained application protocol (coap)  part 2
The constrained application protocol (coap) part 2Hamdamboy (함담보이)
 
HTTP 프로토콜의 이해와 활용
HTTP 프로토콜의 이해와 활용HTTP 프로토콜의 이해와 활용
HTTP 프로토콜의 이해와 활용SangJin Kang
 
Composite Source With Mule ESB
Composite Source With Mule ESBComposite Source With Mule ESB
Composite Source With Mule ESBJitendra Bafna
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Serverwebhostingguy
 
21 Www Web Services
21 Www Web Services21 Www Web Services
21 Www Web Servicesroyans
 
Consuming RESTful services in PHP
Consuming RESTful services in PHPConsuming RESTful services in PHP
Consuming RESTful services in PHPZoran Jeremic
 
Apache flume - an Introduction
Apache flume - an IntroductionApache flume - an Introduction
Apache flume - an IntroductionErik Schmiegelow
 
Mike Taulty DevDays 2010 Silverlight 4 Networking
Mike Taulty DevDays 2010 Silverlight 4 NetworkingMike Taulty DevDays 2010 Silverlight 4 Networking
Mike Taulty DevDays 2010 Silverlight 4 Networkingukdpe
 
Apache server configuration & optimization
Apache server configuration & optimizationApache server configuration & optimization
Apache server configuration & optimizationGokul Muralidharan
 
The constrained application protocol (CoAP)
The constrained application protocol (CoAP)The constrained application protocol (CoAP)
The constrained application protocol (CoAP)Hamdamboy (함담보이)
 
Publishing website by dr. vishnu sharma
Publishing website by dr. vishnu sharmaPublishing website by dr. vishnu sharma
Publishing website by dr. vishnu sharmaVishnu Sharma
 
Apache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya KulkarniApache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya Kulkarniwebhostingguy
 
Web Server Load Balancer
Web Server Load BalancerWeb Server Load Balancer
Web Server Load BalancerMobME Technical
 
Kafka Multi-Tenancy - 160 Billion Daily Messages on One Shared Cluster at LINE
Kafka Multi-Tenancy - 160 Billion Daily Messages on One Shared Cluster at LINEKafka Multi-Tenancy - 160 Billion Daily Messages on One Shared Cluster at LINE
Kafka Multi-Tenancy - 160 Billion Daily Messages on One Shared Cluster at LINEkawamuray
 

Was ist angesagt? (19)

The constrained application protocol (coap) part 2
The constrained application protocol (coap)  part 2The constrained application protocol (coap)  part 2
The constrained application protocol (coap) part 2
 
HTTP 프로토콜의 이해와 활용
HTTP 프로토콜의 이해와 활용HTTP 프로토콜의 이해와 활용
HTTP 프로토콜의 이해와 활용
 
Composite Source With Mule ESB
Composite Source With Mule ESBComposite Source With Mule ESB
Composite Source With Mule ESB
 
RPC protocols
RPC protocolsRPC protocols
RPC protocols
 
How php works
How php worksHow php works
How php works
 
Apache web server
Apache web serverApache web server
Apache web server
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Server
 
21 Www Web Services
21 Www Web Services21 Www Web Services
21 Www Web Services
 
Consuming RESTful services in PHP
Consuming RESTful services in PHPConsuming RESTful services in PHP
Consuming RESTful services in PHP
 
Apache HTTP Server
Apache HTTP ServerApache HTTP Server
Apache HTTP Server
 
5-WebServers.ppt
5-WebServers.ppt5-WebServers.ppt
5-WebServers.ppt
 
Apache flume - an Introduction
Apache flume - an IntroductionApache flume - an Introduction
Apache flume - an Introduction
 
Mike Taulty DevDays 2010 Silverlight 4 Networking
Mike Taulty DevDays 2010 Silverlight 4 NetworkingMike Taulty DevDays 2010 Silverlight 4 Networking
Mike Taulty DevDays 2010 Silverlight 4 Networking
 
Apache server configuration & optimization
Apache server configuration & optimizationApache server configuration & optimization
Apache server configuration & optimization
 
The constrained application protocol (CoAP)
The constrained application protocol (CoAP)The constrained application protocol (CoAP)
The constrained application protocol (CoAP)
 
Publishing website by dr. vishnu sharma
Publishing website by dr. vishnu sharmaPublishing website by dr. vishnu sharma
Publishing website by dr. vishnu sharma
 
Apache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya KulkarniApache Web Server Architecture Chaitanya Kulkarni
Apache Web Server Architecture Chaitanya Kulkarni
 
Web Server Load Balancer
Web Server Load BalancerWeb Server Load Balancer
Web Server Load Balancer
 
Kafka Multi-Tenancy - 160 Billion Daily Messages on One Shared Cluster at LINE
Kafka Multi-Tenancy - 160 Billion Daily Messages on One Shared Cluster at LINEKafka Multi-Tenancy - 160 Billion Daily Messages on One Shared Cluster at LINE
Kafka Multi-Tenancy - 160 Billion Daily Messages on One Shared Cluster at LINE
 

Andere mochten auch

Android Security, Signing and Publishing
Android Security, Signing and PublishingAndroid Security, Signing and Publishing
Android Security, Signing and PublishingJussi Pohjolainen
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android DevelopmentJussi Pohjolainen
 
Android Http Connection and SAX Parsing
Android Http Connection and SAX ParsingAndroid Http Connection and SAX Parsing
Android Http Connection and SAX ParsingJussi Pohjolainen
 
Android 2D Drawing and Animation Framework
Android 2D Drawing and Animation FrameworkAndroid 2D Drawing and Animation Framework
Android 2D Drawing and Animation FrameworkJussi Pohjolainen
 
Android Wi-Fi Manager and Bluetooth Connection
Android Wi-Fi Manager and Bluetooth ConnectionAndroid Wi-Fi Manager and Bluetooth Connection
Android Wi-Fi Manager and Bluetooth ConnectionJussi Pohjolainen
 
00 introduction-mobile-programming-course.ppt
00 introduction-mobile-programming-course.ppt00 introduction-mobile-programming-course.ppt
00 introduction-mobile-programming-course.pptJussi Pohjolainen
 
Android Telephony Manager and SMS
Android Telephony Manager and SMSAndroid Telephony Manager and SMS
Android Telephony Manager and SMSJussi Pohjolainen
 
Short Intro to Android Fragments
Short Intro to Android FragmentsShort Intro to Android Fragments
Short Intro to Android FragmentsJussi Pohjolainen
 

Andere mochten auch (20)

Qt Translations
Qt TranslationsQt Translations
Qt Translations
 
Android Security, Signing and Publishing
Android Security, Signing and PublishingAndroid Security, Signing and Publishing
Android Security, Signing and Publishing
 
Quick Intro to Android Development
Quick Intro to Android DevelopmentQuick Intro to Android Development
Quick Intro to Android Development
 
Responsive Web Site Design
Responsive Web Site DesignResponsive Web Site Design
Responsive Web Site Design
 
Android Http Connection and SAX Parsing
Android Http Connection and SAX ParsingAndroid Http Connection and SAX Parsing
Android Http Connection and SAX Parsing
 
C# for Java Developers
C# for Java DevelopersC# for Java Developers
C# for Java Developers
 
Android Essential Tools
Android Essential ToolsAndroid Essential Tools
Android Essential Tools
 
Android 2D Drawing and Animation Framework
Android 2D Drawing and Animation FrameworkAndroid 2D Drawing and Animation Framework
Android 2D Drawing and Animation Framework
 
Android Wi-Fi Manager and Bluetooth Connection
Android Wi-Fi Manager and Bluetooth ConnectionAndroid Wi-Fi Manager and Bluetooth Connection
Android Wi-Fi Manager and Bluetooth Connection
 
00 introduction-mobile-programming-course.ppt
00 introduction-mobile-programming-course.ppt00 introduction-mobile-programming-course.ppt
00 introduction-mobile-programming-course.ppt
 
Android UI Development
Android UI DevelopmentAndroid UI Development
Android UI Development
 
Android Location and Maps
Android Location and MapsAndroid Location and Maps
Android Location and Maps
 
Android Threading
Android ThreadingAndroid Threading
Android Threading
 
Android Data Persistence
Android Data PersistenceAndroid Data Persistence
Android Data Persistence
 
Android Sensors
Android SensorsAndroid Sensors
Android Sensors
 
Android Multimedia Support
Android Multimedia SupportAndroid Multimedia Support
Android Multimedia Support
 
Android Telephony Manager and SMS
Android Telephony Manager and SMSAndroid Telephony Manager and SMS
Android Telephony Manager and SMS
 
Short Intro to Android Fragments
Short Intro to Android FragmentsShort Intro to Android Fragments
Short Intro to Android Fragments
 
Moved to Speakerdeck
Moved to SpeakerdeckMoved to Speakerdeck
Moved to Speakerdeck
 
Android Basic Components
Android Basic ComponentsAndroid Basic Components
Android Basic Components
 

Ähnlich wie Building Web Services

web services-May 25.ppt
web services-May 25.pptweb services-May 25.ppt
web services-May 25.pptShivaangiKrish
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overviewRaveendra Bhat
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Conceptspasam suresh
 
Welcome to Web Services
Welcome to Web ServicesWelcome to Web Services
Welcome to Web ServicesShivinder Kaur
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureToru Kawamura
 
WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in MuleF K
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIRajkattamuri
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDIShahid Shaik
 
Real-Time Rails: Implementing WebSockets in Rails 5 with Action Cable
Real-Time Rails: Implementing WebSockets in Rails 5 with Action CableReal-Time Rails: Implementing WebSockets in Rails 5 with Action Cable
Real-Time Rails: Implementing WebSockets in Rails 5 with Action CableSophie DeBenedetto
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webserviceDong Ngoc
 
Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study
  Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study  Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study
Mobile Interface to CMS Based On HTML5 and Drupal: A Case StudyHima Javvadi
 
Advanced Web Technology.pptx
Advanced Web Technology.pptxAdvanced Web Technology.pptx
Advanced Web Technology.pptxssuser35fdf2
 
Java Web services
Java Web servicesJava Web services
Java Web servicesSujit Kumar
 
Enjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web APIEnjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web APIKevin Hazzard
 
Writing & Using Web Services
Writing & Using Web ServicesWriting & Using Web Services
Writing & Using Web ServicesRajarshi Guha
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftRX-M Enterprises LLC
 

Ähnlich wie Building Web Services (20)

web services-May 25.ppt
web services-May 25.pptweb services-May 25.ppt
web services-May 25.ppt
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
 
Welcome to Web Services
Welcome to Web ServicesWelcome to Web Services
Welcome to Web Services
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the future
 
signalr
signalrsignalr
signalr
 
WebServices introduction in Mule
WebServices introduction in MuleWebServices introduction in Mule
WebServices introduction in Mule
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDI
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDI
 
Real-Time Rails: Implementing WebSockets in Rails 5 with Action Cable
Real-Time Rails: Implementing WebSockets in Rails 5 with Action CableReal-Time Rails: Implementing WebSockets in Rails 5 with Action Cable
Real-Time Rails: Implementing WebSockets in Rails 5 with Action Cable
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 
Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study
  Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study  Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study
Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study
 
Scala and Lift
Scala and LiftScala and Lift
Scala and Lift
 
Windows 8 Metro apps and the outside world
Windows 8 Metro apps and the outside worldWindows 8 Metro apps and the outside world
Windows 8 Metro apps and the outside world
 
Advanced Web Technology.pptx
Advanced Web Technology.pptxAdvanced Web Technology.pptx
Advanced Web Technology.pptx
 
Java Web services
Java Web servicesJava Web services
Java Web services
 
Enjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web APIEnjoying the Move from WCF to the Web API
Enjoying the Move from WCF to the Web API
 
Writing & Using Web Services
Writing & Using Web ServicesWriting & Using Web Services
Writing & Using Web Services
 
WebServices
WebServicesWebServices
WebServices
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
 

Mehr von Jussi Pohjolainen

libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferencesJussi Pohjolainen
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationJussi Pohjolainen
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDXJussi Pohjolainen
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript DevelopmentJussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame AnimationJussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame AnimationJussi Pohjolainen
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDXJussi Pohjolainen
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDXJussi Pohjolainen
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesJussi Pohjolainen
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platformJussi Pohjolainen
 
Intro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformIntro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformJussi Pohjolainen
 

Mehr von Jussi Pohjolainen (20)

Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
 
libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and Preferences
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame Animation
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: User Input
libGDX: User InputlibGDX: User Input
libGDX: User Input
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
 
Intro to Asha UI
Intro to Asha UIIntro to Asha UI
Intro to Asha UI
 
Intro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformIntro to Java ME and Asha Platform
Intro to Java ME and Asha Platform
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 

Kürzlich hochgeladen

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Kürzlich hochgeladen (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

Building Web Services

  • 1. Building  Web  Services   Jussi  Pohjolainen  
  • 2. Communica9on  between  Apps   •  Implemen9ng  RPCs  can  be  a  difficult  task   •  DCOM,  CORBA,  RMI  …  firewalls  and  proxy   servers  can  block  binary   •  Using  HTTP  for  RPCs  you  can  bypass  this   problem  
  • 3. Web  Service   •  Communica9on  between  devices  over  Web   – W3C  defines  "Web  Service"  as  a  technology  that   uses  WSDL,  SOAP,  HTTP  and  XML  to  create  the   communica9on   •  Two  types   – XML  Web  Services   – Web  API  
  • 4. XML  Web  Services   •  XML  Web  services  uses  XML  messages  that   follow  SOAP  standard  for  crea9ng  the   communica9on   •  Services  are  wriRen  using  WSDL   – Web  Services  Descrip9on  Language  (WSDL)   •  Web  Services  are  integrated  very  well  to  .NET   and  Java  (6  -­‐>)  
  • 5. Web  API  (Rest)   •  Emphasis  to  simpler  communica9on   – Representa)onal  state  transfer  (REST)   •  Do  not  require  SOAP,  WSDL   •  Simple  Web  API   – hRp://www.something.com/twiRerthis.php? msg=hello!   •  If  the  Web  API  is  implemented  using  certain   constraints,  it's  rest  API   – hRp://www.something.com/clients/client17  
  • 7. SOAP?   •  SOAP  is  a  XML-­‐based  protocol  to  let  apps   exchange  informa9on  over  HTTP   •  SOAP  is  language  independent  and  it's  W3C   recommenda9on   •  Since  SOAP  is  XML  and  it's  text,  it  can  be  send   easily  through  firewalls  
  • 8. SOAP  Building  Blocks   <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> ... </soap:Header> <soap:Body> ... <soap:Fault> ... </soap:Fault> </soap:Body> </soap:Envelope>
  • 9. SOAP  Request   <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/ envelope/" xmlns:ns1="http://hello/"> <SOAP-ENV:Body> <ns1:getArea><arg0>5.6</arg0></ns1:getArea> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
  • 10. SOAP  Response   <?xml version="1.0" ?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getAreaResponse xmlns:ns2="http://hello/"> <return>98.5203456165759</return> </ns2:getAreaResponse> </S:Body> </S:Envelope>
  • 11. Client  and  Server   •  "Soap  Server"  provides  a  WSDL  –  file  to  client   •  Client  opens  the  WSDL  file  and  discovers  the   methods  and  arguments  of  given  service   •  Client  makes  a  invoca9on  to  server.  The   invoka9on  is  a  soap  message   •  Server  receives  the  soap  message,  parses  it   and  invocates  the  method.  Result  is  send  back   in  SOAP  envelope  
  • 12.
  • 13. Java  6:  XML  &  Web  Services   •  Easy  way  of  crea9ng  Web  Services   •  Expose  web  service  with  a  simple  annota9on    
  • 14. Web  Service   package hello; import javax.jws.WebService; @WebService public class CircleFunctions { public double getArea(double r) { return java.lang.Math.PI * (r * r); } public double getCircumference(double r) { return 2 * java.lang.Math.PI * r; } }
  • 15. Server   package hello; import javax.xml.ws.Endpoint; class Publish { public static void main(String[] args) { Endpoint.publish( "http://localhost:8080/circlefunctions", new CircleFunctions()); } }
  • 16. Generate  Stub  Files   •  Generate  stub  files:   – wsgen –classpath . hello.CircleFunctions
  • 17.
  • 18. PHP  Client   <?php $arguments = array ( "arg0" => "5.6", ); // URI delivered to web service $soapclient = new SoapClient("http://localhost:8080/ circlefunctions?wsdl"); $result = $soapclient->getArea($arguments); print($result->return); ?>
  • 19.
  • 21. REST  Constraints   •  Client  Server   –  Interface  separates  clients  from  servers.  Server  and  client  can  be   replaced  and  developed  independently   –  Client?  Browser,  PHP  script,  Desktop  app,  Command  line  …   •  Statelessness   –  Each  request  from  any  client  contains  all  the  informa9on  necessary   •  Cacheable   –  Clients  can  cache  responses.  Response  indicate  whether  it  is  cacheable   or  not   •  Uniform  interface   –  Uniform  interface  between  clients  and  servers.  Four  guiding  principles   •  Layered  System   –  Client  does  not  know  is  it  connected  directly  to  server  or  some   middleware  
  • 22. Guidelines  for  the  Interface   •  Iden9fica9on  of  resources   –  Resources  are  iden9fied  via  request  using  URIs   –  Server  sends  to  client  HTML,  XML  or  JSON  as  result  (does  not  send  the   database)   •  Manipula9on  of  resources     –  Client  can  delete  or  modify  a  resource  when  it  holds  a  representa9on   of  the  resource   •  Self-­‐descrip9ve  messages   –  Message  includes  enough  informa9on  to  describe  how  to  process  the   message   •  Hypermedia  as  the  engine  of  applica9on  state   –  Client  enters  REST  app  using  simple  fixed  URL.  All  future  ac9ons  the   client  may  take  can  be  discovered  from  the  returned  representa9on  
  • 23. Resources   •  Resource  can  be  anything:  ar9cle,  comment,   user  …   •  Resources  are  accessed  by  URI   – hRp://example.com/ar9cle/1   – hRp://example.com/comments/  
  • 26. Rewrite  engine   •  Rewrite  engine  is  a  sohware  that  modifies   web  URL's  appearance   – URL  rewri9ng   •  Usage   – hRp://example.com/index.php?clien9d=123   •  Can  be  altered   – hRp://example.com/clients/client/123   •  Apache  HTTP  Server  has  URL  rewri9ng   provided  by  mod_rewrite  module  
  • 27. .htaccess   # Let's use the mod_rewrite module RewriteEngine On # Set's the base URL for per-directory rewrites RewriteBase / # Defines a condition under which rewriting will # take place RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Make the rule RewriteRule ^(.*)$ /xampp/rest/index.php/$1 [L]
  • 28. XAMPP  windows   •  Open  apache/conf/extra/hRpd-­‐xampp.conf   – set  AllowOverride  All  
  • 29. Gekng  info  about  Request  and  Path   <?php $requestMethod = $_SERVER['REQUEST_METHOD']; print("Request method: " . $requestMethod . "nn"); $urlPaths = $_SERVER['REQUEST_URI'] ; print("Path: " . $urlPaths); ?>
  • 30.
  • 31.
  • 32. Modifica9on   <?php $requestMethod = $_SERVER['REQUEST_METHOD']; $urlPaths = $_SERVER['REQUEST_URI'] ; $paths = explode("/", $urlPaths); $paths = array_splice($paths, 3); print_r($paths); ?>
  • 33. Encoding  and  decoding   •  Encode  data  to  and  decode  from  JSON   – json_encode()   – json_decode()  
  • 34. Tes9ng:  Advanced  REST  Client  Chrome  App  
  • 35. Tes9ng   •  PHP  Script  that  makes  hRp  requests   •  CURL   •  Telnet…