What would be the format of data trafficked by a SOAP web service?

2

In web services that use the REST architecture, the format of the data that is trafficked by the network is XML or JSON, in some cases they can be both. However, I do not know what format the data is that is trafficked in a SOAP web service.

So, I would like to know what format the data is going through the network through a SOAP web service?

    
asked by anonymous 05.03.2018 / 17:18

1 answer

2

A web service SOAP traffic XML

More info here: link

  The SOAP message MUST be encoded using XML

That is, SOAP messages always travel in XML

  

A SOAP message is an ordinary XML document

That is, always an XML document.

Here, the basic skeleton of a SOAP message and its format:

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope/" soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
  <soap:Header>
     ...
  </soap:Header>

  <soap:Body>
     ... Aqui vai o corpo da mensagem em XML
    <soap:Fault>
       ...
    </soap:Fault>
  </soap:Body>
</soap:Envelope>
    
05.03.2018 / 17:21