Profilo di Ashish"Getting better never st...FotoBlogElenchiAltro Strumenti Guida

Blog


02 ottobre

Difference between RPC and Document-Centric/Message Oriented application

With Document/Literal encoding/ Message oriented application, the payload of a message is an XML fragment that can be validated against the corresponding XML schema, for instance:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:mi="http://www.somedomain.com/xyz/message-id"
    xmlns:proc="http://www.somedomain.com/xyz/processed-by"
    xmlns:po="http://www.books.com/purchase">
    <soap:Header/>
    <soap:Body>
        <po:purchaseOrder orderDate="2008-09-22"
            xmlns:po="http://www.somedomain.com/xyz/PO">
            <po:accountName>Books.com</po:accountName>
            <po:accountNumber>923</po:accountNumber>
            ...
            <po:book>
                <po:title>Air Guitars In Action</po:title>
                <po:quantity>300</po:quantity>
                <po:wholesale-price>14.99</po:wholesale-price>
            </po:book>
        </po:purchaseOrder>
    </soap:Body>
</soap:Envelope>

RPC (remote procedure call)/Literal more closely corresponds to remote procedure invocations.
For instance, the method: public float getBookPrice(String inISBN) would correspond to the following RPC/Literal request message:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sd="http://www.somedomain.com/xyz/BookQuote">
   <soap:Body>
      <sd:getBookPrice>
          <isbn>0321146182</isbn>
      </sd:getBookPrice>
   </soap:Body>
</soap:Envelope>

One important difference between RPC and Document web services is that with RPC web services, XML schema will only be created for complex type parameters. It is thus not possible to validate the entire XML fragment contained in the SOAP body.
With Document web services, however, the XML schema needs to define the ENTIRE XML fragment contained in the SOAP body. Consequently, the entire message can be validated against the XML schema.

Commenti

Attendere...
Il commento immesso è troppo lungo. Immetti un commento più breve.
Immissione non effettuata. Riprova.
Impossibile aggiungere il commento al momento. Riprova più tardi.
Per aggiungere un commento è necessaria l'autorizzazione di un genitore. Chiedi autorizzazione
I tuoi genitori hanno disattivato i commenti.
Impossibile eliminare il commento al momento. Riprova più tardi.
Hai raggiunto il numero massimo di commenti pubblicabili giornalmente. Riprova tra 24 ore.
Impossibile lasciare commenti. La funzionalità è stata disattivata perché i sistemi hanno rilevato una possibile attività di spamming dal tuo account. Se ritieni che il tuo account è stato disattivato per errore, contatta il supporto tecnico di Windows Live.
Esegui il seguente controllo di protezione per completare la pubblicazione del commento.
I caratteri digitati nel controllo di protezione devono corrispondere ai caratteri dell'immagine o della riproduzione audio.

Per aggiungere un commento, accedi con il tuo Windows Live ID (se utilizzi Hotmail, Messenger o Xbox LIVE possiedi già un Windows Live ID). Accedi


Non hai ancora un Windows Live ID? Registrati

Riferimenti

L'URL di riferimento per questo intervento è:
http://ashishrocks.spaces.live.com/blog/cns!BED6CE34F24CB429!409.trak
Blog che fanno riferimento a questo intervento
  • Nessuno