Q:

What does that mean? SOAP operation represents logic and REST Resources that represent data

I am trying to understand the different between SOAP and REST so one of these differences is. SOAP exposes operation that represents logic and REST exposes Resources that represent data. What does that mean? Can someone clarify that with examples?

A:

SOAP is a standardized communications protocol.
A SOAP request:
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn

<?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">

<soap:Body xmlns:m="http://www.example.org/stock">
  <m:GetStockPrice>
    <m:StockName>IBM</m:StockName>
  </m:GetStockPrice>
</soap:Body>

</soap:Envelope>

The SOAP response:
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn

<?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">

<soap:Body xmlns:m="http://www.example.org/stock">
  <m:GetStockPriceResponse>
    <m:Price>34.5</m:Price>
  </m:GetStockPriceResponse>
</soap:Body>
</soap:Envelope>    

Notice that you're passing data to a SOAP endpoint, and it's returning data in response.  The action is governed entirely by the XML that defines the SOAP protocol.  Also notice that a POST is being used, so this could, in fact, be a REST-style endpoint.
REST is an architectural style, not a communications protocol.
REST is an understanding that endpoints represent resources, and some mechanisms that promote that understanding.  REST endpoints are entirely agnostic about the kind of data that is passed back and forth between them; you can have SOAP data, XML data associated with AJAX, JSON, or pretty much anything else.
Further Reading
What is REST?
SOAP Example
How I Explained REST to my Wife

