Võrgurakenduste protokollid 2: erinevus redaktsioonide vahel

Allikas: Lambda
Mine navigeerimisribale Mine otsikasti
Resümee puudub
Resümee puudub
1. rida: 1. rida:
== xml-rpc ==
Read: http://www.xmlrpc.com/
Call example:
<pre>
POST /RPC2 HTTP/1.0
User-Agent: Frontier/5.1.2 (WinNT)
Host: betty.userland.com
Content-Type: text/xml
Content-length: 181
<?xml version="1.0"?>
<methodCall>
      <methodName>examples.getStateName</methodName>
      <params>
          <param> <value><i4>41</i4></value> </param>
      </params>
  </methodCall>
</pre>
== SOAP ==
== SOAP ==
Read in this order:
* [http://en.wikipedia.org/wiki/SOAP wikipedia]
* [http://www.w3schools.com/soap/ w3schools micro-tutorial]
* [http://www.w3.org/TR/2007/REC-soap12-part0-20070427/ w3c primer]
Small recent example from xTee:
Request:
<pre>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xtee="http://x-tee.riik.ee/xsd/xtee.xsd" xmlns:ehis="http://producers.ehis.xtee.riik.ee/producer/ehis">
  <soapenv:Header>
      <xtee:id xsi:type="xsd:string">680e0c731a244e2c91210e1540458441</xtee:id>
      <xtee:nimi xsi:type="xsd:string">ehis.idpilet</xtee:nimi>
      <xtee:isikukood xsi:type="xsd:string">10101010101</xtee:isikukood>
      <xtee:andmekogu xsi:type="xsd:string">ehis</xtee:andmekogu>
      <xtee:asutus xsi:type="xsd:string">10747013</xtee:asutus>
  </soapenv:Header>
  <soapenv:Body>
      <ehis:idpilet soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <keha xsi:type="ehis:EHIS_Isikukood">10101010101</keha>
      </ehis:idpilet>
  </soapenv:Body>
</soapenv:Envelope>
</pre>
Answer:
<pre>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
      <ns1:idpiletResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://producers.ehis.xtee.riik.ee/producer/ehis">
        <paring xsi:type="ns1:EHIS_Isikukood">10101010101</paring>
        <keha xsi:type="ns1:EHIS_Boolean">ei</keha>
      </ns1:idpiletResponse>
  </soapenv:Body>
</soapenv:Envelope>
</pre>
== XML Schema ==
Read in this order:
* [http://en.wikipedia.org/wiki/XML_Schema_%28W3C%29 wikipedia]
* [http://www.w3schools.com/Schema/ w3schools micro-tutorial]
* [http://www.w3.org/TR/xmlschema-0/ w3c primer]
== SOAP further explanations ==


Good explanatory stuff from simpler to more complex:
Good explanatory stuff from simpler to more complex:

Redaktsioon: 14. september 2012, kell 12:14

xml-rpc

Read: http://www.xmlrpc.com/

Call example:

POST /RPC2 HTTP/1.0
User-Agent: Frontier/5.1.2 (WinNT)
Host: betty.userland.com
Content-Type: text/xml
Content-length: 181

<?xml version="1.0"?> 
 <methodCall> 
       <methodName>examples.getStateName</methodName> 
       <params> 
           <param> <value><i4>41</i4></value> </param> 
      </params> 
  </methodCall> 


SOAP

Read in this order:

Small recent example from xTee:


Request:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xtee="http://x-tee.riik.ee/xsd/xtee.xsd" xmlns:ehis="http://producers.ehis.xtee.riik.ee/producer/ehis">
   <soapenv:Header>
      <xtee:id xsi:type="xsd:string">680e0c731a244e2c91210e1540458441</xtee:id>
      <xtee:nimi xsi:type="xsd:string">ehis.idpilet</xtee:nimi>
      <xtee:isikukood xsi:type="xsd:string">10101010101</xtee:isikukood>
      <xtee:andmekogu xsi:type="xsd:string">ehis</xtee:andmekogu>
      <xtee:asutus xsi:type="xsd:string">10747013</xtee:asutus>
   </soapenv:Header>
   <soapenv:Body>
      <ehis:idpilet soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <keha xsi:type="ehis:EHIS_Isikukood">10101010101</keha>
      </ehis:idpilet>
   </soapenv:Body>
</soapenv:Envelope>

Answer:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns1:idpiletResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://producers.ehis.xtee.riik.ee/producer/ehis">
         <paring xsi:type="ns1:EHIS_Isikukood">10101010101</paring>
         <keha xsi:type="ns1:EHIS_Boolean">ei</keha>
      </ns1:idpiletResponse>
   </soapenv:Body>
</soapenv:Envelope>

XML Schema

Read in this order:


SOAP further explanations

Good explanatory stuff from simpler to more complex:

SOAP extra tech

Stuff often used with SOAP: describing services (wsdl), service catalogue (uddi), additional interoperability standards (WS-I).

If worried, read "s stands for simple" first.

A detailed demo of SOAP and WSDL stuff with all the tiniest details can be found at the gsoap toolkit site. The demo WSDL used in the live examples is also quite readable.

WSDL

A detailed but partly almost readable w3c primer: http://www.w3.org/TR/wsdl20-primer/. You may also have a look at the old version primer.

A fairly good presentation explaining WSDL: Fail:WSDL.pdf

UDDI

Read the wikipedia overview

WS-I stuff

Read the wikipedia overview and have a brief look at the ws-i official site.