Simple Object Access Protocol (SOAP)

Inhalt


Einleitung

SOAP + JAXM
SOAP Prozessmodell und SOAP - JAXM Zusammenarbeit
(Quelle: JAXM Spec)

'Historie':

Beispiel: Hallo SOAP Server

POST /HalloServer HTTP/1.1
Host: www.hallo-welt.com
Content-Type: text/xml; charset="utf-8"
Content-Length: nnnn
SOAPAction: "ein URI"

<SOAP-ENV:Envelope
  xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/"
  SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
       <m:GetGreeting xmlns:m="ein NS-URI">
           <myName>Heinz Kredel</myName>
       </m:GetGreeting>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Beispiel: Antwort vom SOAP Server

HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
Content-Length: nnnn

<SOAP-ENV:Envelope
  xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/"
  SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"/>
   <SOAP-ENV:Body>
       <m:getGreetingResponse xmlns:m="ein NS-URI">
           <message>Hallo Heinz Kredel!</message>
       </m:GetGreetingResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Transport in HTTP

Arten von SOAP Nachrichten

 


SOAP Nachrichten

verwendete Namensräume

SOAP Nachrichten dürfen keine DTDs (Document Type Definitions) und keine PIs (Processing INstruction) enthalten

Ein SOAP-Processor (Empfänger) muss in der Lage sein

SOAP Envelope

SOAP (einfach)
SOAP ohne Attachments
(Quelle: JAXM Spec)

allgemeinste Form eines SOAP-Envelopes

<SOAP-ENV:Envelope xmlns:SOAP-ENV = "NS-URI" 
                   encodingStyle = "NS-URI" >
   <SOAP-ENV:Header>
       Header Inhalt
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
       Body Inhalt
   </SOAP-ENV:Body>
   <xxx:other xmlns:xxx = "NS-URI" >
       anderer Inhalt
   </xxx:other>
</SOAP-ENV:Envelope>

das SOAP-Fault Element

   <SOAP-ENV:Body>
       <SOAP-ENV:Fault>
           <faultcode>SOAP-ENV:Server</faultcode>
           <faultstring>Beschreibung</faultstring>
           <faultactor>actor-URI</faultactor>
           <detail>
               <e:message xmlns:e="ein NS-URI">
                  Kann das Element xxx nicht verarbeiten.
               </e:message>
           </detail>
       </SOAP-ENV:Fault>
   </SOAP-ENV:Body>

Fehler-Codes in faultcode sind analog zu HTTP 1xx, 2xx, 3xx, 4xx, 5xx Codes:

SOAP Encoding

SOAP für RPC

Funktionsaufrufe werden im SOAP-Body als zusammengesetzter Datentyp übertragen.

z.B.

  <methodName>
    <arg1Name>3</arg1Name>
    <arg2Name>5</arg2Name>
    <arg3Name>7</arg3Name>
  </methodName>

SOAP mit Attachments

SOAP (mit Attachments)
SOAP mit Attachments
(Quelle: JAXM Spec)

JAXM: Java API for XML Messaging

Unterstützt SOAP und SOAP mit Attachments.

Unterstützt ebXML: e-bussines-XML.

SOAP + JAXM
SOAP - JAXM Zusammenarbeit
(Quelle: JAXM Spec)

© Universität Mannheim, Rechenzentrum, 1998-2002.

Heinz Kredel
Last modified: Fri Dec 28 17:28:04 MET 2001