Quando usa-se o SMTP para transmitir mensagens
SOAP, algumas abstrações dos atributos do cabeçalho
SMTP precisam ser feitas e o servidor SMTP em questão deve ser
configurado para lidar com o protocolo. As mensagens do exemplo,
usando SMTP, ficariam assim:
Pedido (Request):
To:
<dre@ws.dre.ufrj.br>
From:
<cliente@cliente.com>
Reply-To:
<cliente@cliente.com>
Date:
Tue, 15 Nov 2001 23:27:00 -0700
Message-Id:
<1F75D4D515C3EC3F34FEAB51237675B5@cliente.com>
MIME-Version: 1.0
Content-Type: text/xml;
charset=utf-8
Content-Transfer-Encoding:
QUOTED-PRINTABLE
<?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"
xmlns:tiposns="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<m:atenticacao
xmlns:m="http://www.dre.ufrj.br/ws/dre">21423edf69fgs</m:atenticacao>
</soap:Header>
<soap:Body>
<m:retornaNome
xmlns:m="http://www.dre.ufrj.br/ws/dre">
<numdre
type="tiposns:int">106017797</drenum>
</m:retornaNome>
</soap:Body>
</soap:Envelope>
------------------------------------------------------------------------------------------------------------------------------------
Resposta (Response):
To:
<cliente@cliente.com>
From:
<dre@ws.dre.ufrj.br>
Date:
Tue, 13 Nov 2001 23:27:00 -0700
In-Reply-To:
<1F75D4D515C3EC3F34FEAB51237675B5@cliente.com>
Message-Id:
<FF75D4D515C3EC3F34FEAB51237675B5@ws.dre.ufrj.br>
MIME-Version: 1.0
Content-Type: TEXT/XML;
charset=utf-8
Content-Transfer-Encoding:
QUOTED-PRINTABLE
<?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"
xmlns:tiposns="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<m:atenticacao
xmlns:m="http://www.dre.ufrj.br/ws/dre">2kg469fgs</m:atenticacao>
</soap:Header>
<soap:Body>
<m:retornaNomeResponse
xmlns:m="http://www.dre.ufrj.br/ws/dre">
<nome
type="tiposns:string">Leonardo Bentes
Armt</nome>
</m:retornaNomeResponse>
<soap:Fault>
</soap:Fault>
</soap:Body>
</soap:Envelope>