% CVSId: $Id: adulau.tex,v 1.1 2003/02/07 17:51:53 adulau Exp adulau $
%
%
%     Copyright (c)  2001,2002,2003  Alexandre Dulaunoy <adulau@foo.be>
%     Permission is granted to copy, distribute and/or modify this document
%     under the terms of the GNU Free Documentation License, Version 1.2
%     or any later version published by the Free Software Foundation;
%     with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
%     A copy of the license is included in the section entitled "GNU
%     Free Documentation License".
\documentclass[%
pdf,
%nocolorBG,
colorBG,
slideColor,
%slideBW,
%draft,
frames
%azure
%contemporain
%nuancegris
%troispoints
%lignesbleues
%darkblue
%alienglow
%autumn
]{prosper}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage{pslatex}
\usepackage[french,english]{babel}
%\usepackage{listings}

\begin{document}
\title{Sécurité en ingénierie du Logiciel}
\subtitle{Le cadre des Web Services \\ {\em Partie 7 : Introduction à SOAP}}
\author{Alexandre Dulaunoy}
\email{adulau@foo.be}
\maketitle

\begin{slide}{Agenda}
\begin{itemize}
\item Introduction
\item SOAP format (par l'exemple)
\item SOAP format des erreurs
\item SOAP format et transport HTTP
\end{itemize}
\end{slide}

\begin{slide}{Introduction}
SOAP
\tiny{is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing
what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses. SOAP can potentially be
used in combination with a variety of other protocols; however, the only bindings defined in this document describe how to use SOAP in combination with HTTP and HTTP Extension Framework.}\\
\normalsize
Simple Object Access Protocol (SOAP) 1.1 - Document W3C
\end{slide}

\begin{slide}{SOAP format (par l'exemple)}

public interface Hello\\
\{\\
    public String sayHelloTo(String name);\\
\}\\
\begin{itemize}
\item La méthode sayHelloTo pourrait être *,
\item Pour interfacer sayHelloTo (client/serveur),
\item Pas limité à Java (uniquement pour l'exemple),
\end{itemize}
\end{slide}

\begin{slide}{SOAP format (par l'exemple)}
<?xml version="1.0"?>\\
<Hello>\\
    <sayHelloTo>\\
        <name>John</name>\\
    </sayHelloTo>\\
</Hello>\\
\begin{itemize}
\item Requête vers l'interface Hello définie,
\item Définition de la méthode,
\item Paramètres de la méthode,
\end{itemize}
\end{slide}

\begin{slide}{SOAP format (par l'exemple)}
<?xml version="1.0"?>\\
<Hello>\\
    <sayHelloToResponse>\\
        <message>Hello John, How are you?</message>\\
    </sayHelloToResponse>\\
</Hello>\\
\begin{itemize}
\item Réponse à la requête (vers l'interface Hello),
\item Methode + "Response",
\item Un "message" de retour.
\end{itemize}
\end{slide}

\begin{slide}{SOAP format (requête)}

<SOAP-ENV:Envelope
                       xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/"
                       xmlns:xsi="
http://www.w3.org/1999/XMLSchema-instance"
                       xmlns:xsd="http://www.w3.org/1999/XMLSchema">\\
     <SOAP-ENV:Header>\\
     </SOAP-ENV:Header>\\
    <SOAP-ENV:Body>\\
         <ns1:sayHelloTo\\
                      xmlns:ns1="Hello"\\
                     SOAP-ENV:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">\\
             <name xsi:type="xsd:string">John</name>\\
         </ns1:sayHelloTo>\\
    </SOAP-ENV:Body>\\
</SOAP-ENV:Envelope>\\
\end{slide}

\begin{slide}{SOAP format (retour)}
<SOAP-ENV:Envelope
                       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"              
                       xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
                       xmlns:xsd="http://www.w3.org/1999/XMLSchema">\\
     <SOAP-ENV:Body>\\
           <ns1:sayHelloToResponse\\
                      xmlns:ns1="Hello"\\
                      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\\
                <return xsi:type="xsd:string">Hello John, How are you doing?</return>\\
          </ns1:sayHelloToResponse>\\
    </SOAP-ENV:Body>\\
</SOAP-ENV:Envelope>\\
\end{slide}

\begin{slide}{SOAP format (header)}


<SOAP-ENV:Header>\\
     <t:Transaction xmlns:t="some-URI" SOAP-ENV:mustUnderstand="1">\\
          5\\
     </t:Transaction>\\
</SOAP-ENV:Header>\\

\end{slide}

\begin{slide}{SOAP format (erreur)}

<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/">\\
   <SOAP-ENV:Body>\\
       <SOAP-ENV:Fault>\\
           <faultcode>SOAP-ENV:Server</faultcode>\\
           <faultstring>Server Error</faultstring>\\
           <detail>
               <e:myfaultdetails xmlns:e="Hello">\\
                 <message>
                   Sorry, my silly constraint says that I cannot say hello on Friday.
                 </message>\\
                 <errorcode>
                   1001
                 </errorcode>\\
               </e:myfaultdetails>\\
           </detail>\\
       </SOAP-ENV:Fault>\\
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>\\

\end{slide}

\begin{slide}{SOAP format (+header)}

<SOAP-ENV:Envelope
                       xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/"
                       xmlns:xsi="\\
http://www.w3.org/1999/XMLSchema-instance"
                       xmlns:xsd="http://www.w3.org/1999/XMLSchema">\\
     <SOAP-ENV:Header>\\
         <t:Transaction xmlns:t="some-URI"
SOAP-ENV:mustUnderstand="1">\\
              5
         </t:Transaction>\\
     </SOAP-ENV:Header>
    <SOAP-ENV:Body>
         <ns1:sayHelloTo
                      xmlns:ns1="Hello"
                     SOAP-ENV:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">\\
             <name xsi:type="xsd:string">Alex</name>
         </ns1:sayHelloTo>\\
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

\end{slide}
\begin{slide}{SOAP format (erreur sur header)}
<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/">\\
   <SOAP-ENV:Body>\\
       <SOAP-ENV:Fault>\\
           <faultcode>SOAP-ENV:MustUnderstand</faultcode>\\
           <faultstring>SOAP Must Understand\\
Error</faultstring>
       </SOAP-ENV:Fault>\\
   </SOAP-ENV:Body>\\
</SOAP-ENV:Envelope>

\end{slide}

\begin{slide}{SOAP via HTTP}
\tiny{
POST http://www.SmartHello.com/HelloApplication HTTP/1.0\\
Content-Type: text/xml; charset="utf-8"\\
Content-Length: 587\\
SOAPAction: "http://www.SmartHello.com/HelloApplication\#sayHelloTo"\\
<SOAP-ENV:Envelope
                       xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/"
                       xmlns:xsi="
http://www.w3.org/1999/XMLSchema-instance"\\
                       xmlns:xsd="http://www.w3.org/1999/XMLSchema">
     <SOAP-ENV:Header>
     </SOAP-ENV:Header>\\
    <SOAP-ENV:Body>
         <ns1:sayHelloTo
                      xmlns:ns1="Hello"
                     SOAP-ENV:encodingStyle="\\
http://schemas.xmlsoap.org/soap/encoding/">
             <name xsi:type="xsd:string">John</name>
         </ns1:sayHelloTo>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
}
\end{slide}

\begin{slide}{SOAP via HTTP (retour)}
\tiny{
HTTP/1.0 200 OK\\
Content-Type: text/xml; charset="utf-8"\\
Content-Length: 615\\
<SOAP-ENV:Envelope
                       xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/"              
                       xmlns:xsi="\\
http://www.w3.org/1999/XMLSchema-instance"
                       xmlns:xsd="http://www.w3.org/1999/XMLSchema">\\
     <SOAP-ENV:Body>
           <ns1:sayHelloToResponse\\
                      xmlns:ns1="Hello"
                      SOAP-ENV:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/">\\
                <return xsi:type="xsd:string">Hello John, How are
you doing?</return>\\
          </ns1:sayHelloToResponse>
    </SOAP-ENV:Body>\\
</SOAP-ENV:Envelope>

}
\end{slide}

\begin{slide}{SOAP : plusieurs transports}
\begin{itemize}
\item via HTTP / TLS,
\item via les extensions HTTP,
\item via SMTP,
\item via "Batch processing",
\item via ...
\end{itemize}
\end{slide}

\begin{slide}{Q\&R}
\begin{itemize}
\item adulau@foo.be
\item http://www.foo.be/cours/securite-webservices/
\item 3B12 DCC2 82FA 2931 2F5B  709A 09E2 CD49 44E6 CBCD
\end{itemize}
\end{slide}

\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t%%% End: 
