SlideShare a Scribd company logo
Gustavo Loureiro dos Reis
Leonardo César de Sousa Campos
Victor da Silva Montalvão
• Componentes da Aplicação

• utilizam Protocolos Abertos

• Completo e Autodescrito
• Disponibilizados através da
  Web para outras aplicações
Arquivo .asmx – extensão ASP.NET para XML Web Services
<%@ WebService Language="VBScript" Class="TempConvert" %>

Imports System
Imports System.Web.Services

Public Class TempConvert :Inherits WebService

<WebMethod()> Public Function FahrenheitToCelsius
(ByVal Fahrenheit As String) As String
  dim fahr
  fahr=trim(replace(Fahrenheit,",","."))
  if fahr="" or IsNumeric(fahr)=false then return "Error"
  return ((((fahr) - 32) / 9) * 5)
end function

<WebMethod()> Public Function CelsiusToFahrenheit
(ByVal Celsius As String) As String
  dim cel
  cel=trim(replace(Celsius,",","."))
  if cel="" or IsNumeric(cel)=false then return "Error"
  return ((((cel) * 9) / 5) + 32)
end function

end class


                                           http://www.w3schools.com/webservices/ws_example.asp
Transport Protocol
• HTTP, FTP, SMTP


Messaging Protocol
• SOAP, WS-Addressing


Description Protocol
• Public Interface
• WSDL

Discovery Protocol
• Available Services
• UDDL*
• Protocolo baseado em XML
• Troca de informações via HTTP
  Blocks
  Envelope


   Header


   Body


   Fault
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn

<?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:Body xmlns:m="http://www.example.org/stock">
  <m:GetStockPrice>
                                   HTTP/1.1 200 OK
    <m:StockName>IBM</m:StockName>
                                   Content-Type: application/soap+xml; charset=utf-8
  </m:GetStockPrice>
                                   Content-Length: nnn
</soap:Body>
                                   <?xml version="1.0"?>
</soap:Envelope>
                                   <soap:Envelope
                                   xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
                                   soap:encodingStyle="http://www.w3.org/2001/12/soap-
                                   encoding">

                                   <soap:Body xmlns:m="http://www.example.org/stock">
                                     <m:GetStockPriceResponse>
                                       <m:Price>34.5</m:Price>
                                     </m:GetStockPriceResponse>
                                   </soap:Body>

                                   </soap:Envelope>
public HTTPRequest()
    {
        try {
            HttpClient httpclient = new DefaultHttpClient();
            String body="Data";
            String bodyLength=new Integer(body.length()).toString();
            System.out.println(bodyLength);

            URI uri=new URI("SOMEURL?Param1=1234&Param2=abcd");
            HttpPost httpPost = new HttpPost(uri);
            httpPost.addHeader( "SOAPAction", strReferenceToSoapActionValue );
            StringEntity entity = new StringEntity(body,
"text/xml",HTTP.DEFAULT_CONTENT_CHARSET);
            httpPost.setEntity(entity);

           RequestWrapper requestWrapper=new RequestWrapper(httpPost);
           requestWrapper.setMethod("POST");
           requestWrapper.setHeader( "SOAPAction", strReferenceToSoapActionValue );
           requestWrapper.removeHeaders("Host");
           requestWrapper.setHeader("Host", “...");
           HttpResponse response = httpclient.execute(requestWrapper);
       } catch (Exception e) { e.printStackTrace();     }
   }
• XML-based Language for
  Locating and Describing
  Web Services
• JAX-WS é uma biblioteca de chamadas
  remotas de procedimento (RPC), que
  permite implementar serviços baseados
  nas normas XSD, WSDL e SOAP
...Definir o mapeamento de
     WSDL para Java e vice-versa

... implementar Web Services partindo de
   um contrato WSDL ou de código Java

        ...criar código cliente de
      invocação de Web Services
Chamadas remotas de procedimento, passo-a-passo:
OBS: Definição do acordo WSDL entre cliente e servidor
Web Services
Web Services
Web Services
Web Services

More Related Content

What's hot

Mule parsing with json
Mule parsing with jsonMule parsing with json
Mule parsing with json
Anirban Sen Chowdhary
 
Mule esb using file to string and logger component
Mule esb using file to string and logger componentMule esb using file to string and logger component
Mule esb using file to string and logger component
Germano Barba
 
Php sql-android
Php sql-androidPhp sql-android
Php sql-android
maamir farooq
 
GeeCON 2013 - EJB application guided by tests
GeeCON 2013 - EJB application guided by testsGeeCON 2013 - EJB application guided by tests
GeeCON 2013 - EJB application guided by testsJakub Marchwicki
 
Routine per aprire documenti da vb6 [santi caltabiano].txt blocco note
Routine per aprire documenti da vb6 [santi caltabiano].txt   blocco noteRoutine per aprire documenti da vb6 [santi caltabiano].txt   blocco note
Routine per aprire documenti da vb6 [santi caltabiano].txt blocco note
santi caltabiano
 
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
Maki Toshio
 
Reactive Web - Servlet & Async, Non-blocking I/O
Reactive Web - Servlet & Async, Non-blocking I/OReactive Web - Servlet & Async, Non-blocking I/O
Reactive Web - Servlet & Async, Non-blocking I/O
Arawn Park
 
MySql cheat sheet
MySql cheat sheetMySql cheat sheet
MySql cheat sheet
Lam Hoang
 
Transmogrifier: Migrating to Plone with less pain
Transmogrifier: Migrating to Plone with less painTransmogrifier: Migrating to Plone with less pain
Transmogrifier: Migrating to Plone with less pain
Lennart Regebro
 
Example esb flow
Example esb flowExample esb flow
Example esb flow
Antonio Pellegrino
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scripting
Dan Morrill
 
Additional action script 3.0
Additional action script 3.0Additional action script 3.0
Additional action script 3.0Brian Kelly
 

What's hot (12)

Mule parsing with json
Mule parsing with jsonMule parsing with json
Mule parsing with json
 
Mule esb using file to string and logger component
Mule esb using file to string and logger componentMule esb using file to string and logger component
Mule esb using file to string and logger component
 
Php sql-android
Php sql-androidPhp sql-android
Php sql-android
 
GeeCON 2013 - EJB application guided by tests
GeeCON 2013 - EJB application guided by testsGeeCON 2013 - EJB application guided by tests
GeeCON 2013 - EJB application guided by tests
 
Routine per aprire documenti da vb6 [santi caltabiano].txt blocco note
Routine per aprire documenti da vb6 [santi caltabiano].txt   blocco noteRoutine per aprire documenti da vb6 [santi caltabiano].txt   blocco note
Routine per aprire documenti da vb6 [santi caltabiano].txt blocco note
 
Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6Searched gems which supports only ruby 2.6
Searched gems which supports only ruby 2.6
 
Reactive Web - Servlet & Async, Non-blocking I/O
Reactive Web - Servlet & Async, Non-blocking I/OReactive Web - Servlet & Async, Non-blocking I/O
Reactive Web - Servlet & Async, Non-blocking I/O
 
MySql cheat sheet
MySql cheat sheetMySql cheat sheet
MySql cheat sheet
 
Transmogrifier: Migrating to Plone with less pain
Transmogrifier: Migrating to Plone with less painTransmogrifier: Migrating to Plone with less pain
Transmogrifier: Migrating to Plone with less pain
 
Example esb flow
Example esb flowExample esb flow
Example esb flow
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scripting
 
Additional action script 3.0
Additional action script 3.0Additional action script 3.0
Additional action script 3.0
 

Viewers also liked

CORE - RedeCASD Lightning Talks
CORE - RedeCASD Lightning TalksCORE - RedeCASD Lightning Talks
CORE - RedeCASD Lightning Talks
Victor Montalvão
 
Rotas de Rede - RedeCASD 2012
Rotas de Rede - RedeCASD 2012Rotas de Rede - RedeCASD 2012
Rotas de Rede - RedeCASD 2012Victor Montalvão
 
Are APIs and SOA Converging?
Are APIs and SOA Converging?Are APIs and SOA Converging?
Are APIs and SOA Converging?Akana
 
Amazon’s lower cost structure cascade chart
Amazon’s lower cost structure cascade chartAmazon’s lower cost structure cascade chart
Amazon’s lower cost structure cascade chartMekko Graphics
 
Amazon's secret sauce
Amazon's secret sauceAmazon's secret sauce
Amazon's secret sauce
McKinsey on Marketing & Sales
 

Viewers also liked (7)

CORE - RedeCASD Lightning Talks
CORE - RedeCASD Lightning TalksCORE - RedeCASD Lightning Talks
CORE - RedeCASD Lightning Talks
 
Apresentação DOO 2013
Apresentação DOO 2013Apresentação DOO 2013
Apresentação DOO 2013
 
Rotas de Rede - RedeCASD 2012
Rotas de Rede - RedeCASD 2012Rotas de Rede - RedeCASD 2012
Rotas de Rede - RedeCASD 2012
 
Java, PortalH8 e RedeCASD
Java, PortalH8 e RedeCASDJava, PortalH8 e RedeCASD
Java, PortalH8 e RedeCASD
 
Are APIs and SOA Converging?
Are APIs and SOA Converging?Are APIs and SOA Converging?
Are APIs and SOA Converging?
 
Amazon’s lower cost structure cascade chart
Amazon’s lower cost structure cascade chartAmazon’s lower cost structure cascade chart
Amazon’s lower cost structure cascade chart
 
Amazon's secret sauce
Amazon's secret sauceAmazon's secret sauce
Amazon's secret sauce
 

Similar to Web Services

Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jerseyb_kathir
 
Ajax
AjaxAjax
Ajax
Yoga Raja
 
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
PHP Conference Argentina
 
8 Minutes On Rack
8 Minutes On Rack8 Minutes On Rack
8 Minutes On Rack
danwrong
 
Ajax and xml
Ajax and xmlAjax and xml
Ajax and xml
sawsan slii
 
Soap Component
Soap ComponentSoap Component
Soap Component
sivachandra mandalapu
 
Server Side Swift: Vapor
Server Side Swift: VaporServer Side Swift: Vapor
Server Side Swift: Vapor
Paweł Kowalczuk
 
Ajax - a quick introduction
Ajax - a quick introductionAjax - a quick introduction
Ajax - a quick introduction
Stefan Pettersson
 
Creating a polyglottestframework
Creating a polyglottestframeworkCreating a polyglottestframework
Creating a polyglottestframework
erwindeg
 
Core Java tutorial at Unit Nexus
Core Java tutorial at Unit NexusCore Java tutorial at Unit Nexus
Core Java tutorial at Unit Nexus
Unit Nexus Pvt. Ltd.
 
Introduction to Ajax programming
Introduction to Ajax programmingIntroduction to Ajax programming
Introduction to Ajax programming
Fulvio Corno
 
AJAX
AJAXAJAX
AJAX
AJAXAJAX
How to use soap component
How to use soap componentHow to use soap component
How to use soap component
RaviRajuRamaKrishna
 
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middleware
Alona Mekhovova
 

Similar to Web Services (20)

Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jersey
 
Ajax
AjaxAjax
Ajax
 
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
2013 - Nate Abele: HTTP ALL THE THINGS: Simplificando aplicaciones respetando...
 
8 Minutes On Rack
8 Minutes On Rack8 Minutes On Rack
8 Minutes On Rack
 
Ajax and xml
Ajax and xmlAjax and xml
Ajax and xml
 
servlets
servletsservlets
servlets
 
Os Pruett
Os PruettOs Pruett
Os Pruett
 
Soap Component
Soap ComponentSoap Component
Soap Component
 
Server Side Swift: Vapor
Server Side Swift: VaporServer Side Swift: Vapor
Server Side Swift: Vapor
 
Ajax - a quick introduction
Ajax - a quick introductionAjax - a quick introduction
Ajax - a quick introduction
 
Creating a polyglottestframework
Creating a polyglottestframeworkCreating a polyglottestframework
Creating a polyglottestframework
 
Core Java tutorial at Unit Nexus
Core Java tutorial at Unit NexusCore Java tutorial at Unit Nexus
Core Java tutorial at Unit Nexus
 
Introduction to Ajax programming
Introduction to Ajax programmingIntroduction to Ajax programming
Introduction to Ajax programming
 
Aimaf
AimafAimaf
Aimaf
 
Ajax
AjaxAjax
Ajax
 
AJAX
AJAXAJAX
AJAX
 
AJAX
AJAXAJAX
AJAX
 
How to use soap component
How to use soap componentHow to use soap component
How to use soap component
 
08 ajax
08 ajax08 ajax
08 ajax
 
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middleware
 

Recently uploaded

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 

Recently uploaded (20)

Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 

Web Services

  • 1. Gustavo Loureiro dos Reis Leonardo César de Sousa Campos Victor da Silva Montalvão
  • 2. • Componentes da Aplicação • utilizam Protocolos Abertos • Completo e Autodescrito • Disponibilizados através da Web para outras aplicações
  • 3. Arquivo .asmx – extensão ASP.NET para XML Web Services <%@ WebService Language="VBScript" Class="TempConvert" %> Imports System Imports System.Web.Services Public Class TempConvert :Inherits WebService <WebMethod()> Public Function FahrenheitToCelsius (ByVal Fahrenheit As String) As String dim fahr fahr=trim(replace(Fahrenheit,",",".")) if fahr="" or IsNumeric(fahr)=false then return "Error" return ((((fahr) - 32) / 9) * 5) end function <WebMethod()> Public Function CelsiusToFahrenheit (ByVal Celsius As String) As String dim cel cel=trim(replace(Celsius,",",".")) if cel="" or IsNumeric(cel)=false then return "Error" return ((((cel) * 9) / 5) + 32) end function end class http://www.w3schools.com/webservices/ws_example.asp
  • 4.
  • 5. Transport Protocol • HTTP, FTP, SMTP Messaging Protocol • SOAP, WS-Addressing Description Protocol • Public Interface • WSDL Discovery Protocol • Available Services • UDDL*
  • 6. • Protocolo baseado em XML • Troca de informações via HTTP Blocks Envelope Header Body Fault
  • 7. POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?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:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> HTTP/1.1 200 OK <m:StockName>IBM</m:StockName> Content-Type: application/soap+xml; charset=utf-8 </m:GetStockPrice> Content-Length: nnn </soap:Body> <?xml version="1.0"?> </soap:Envelope> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap- encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope>
  • 8. public HTTPRequest() { try { HttpClient httpclient = new DefaultHttpClient(); String body="Data"; String bodyLength=new Integer(body.length()).toString(); System.out.println(bodyLength); URI uri=new URI("SOMEURL?Param1=1234&Param2=abcd"); HttpPost httpPost = new HttpPost(uri); httpPost.addHeader( "SOAPAction", strReferenceToSoapActionValue ); StringEntity entity = new StringEntity(body, "text/xml",HTTP.DEFAULT_CONTENT_CHARSET); httpPost.setEntity(entity); RequestWrapper requestWrapper=new RequestWrapper(httpPost); requestWrapper.setMethod("POST"); requestWrapper.setHeader( "SOAPAction", strReferenceToSoapActionValue ); requestWrapper.removeHeaders("Host"); requestWrapper.setHeader("Host", “..."); HttpResponse response = httpclient.execute(requestWrapper); } catch (Exception e) { e.printStackTrace(); } }
  • 9. • XML-based Language for Locating and Describing Web Services
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. • JAX-WS é uma biblioteca de chamadas remotas de procedimento (RPC), que permite implementar serviços baseados nas normas XSD, WSDL e SOAP
  • 15. ...Definir o mapeamento de WSDL para Java e vice-versa ... implementar Web Services partindo de um contrato WSDL ou de código Java ...criar código cliente de invocação de Web Services
  • 16. Chamadas remotas de procedimento, passo-a-passo:
  • 17. OBS: Definição do acordo WSDL entre cliente e servidor