How can I access to a web service using SOAP in C# and get data from it? The request template is as follows:
POST /webservice/TsePublicV2.asmx HTTP/1.1
Host: service.tsetmc.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<MarketValue xmlns="http://tsetmc.com/">
<UserName>string</UserName>
<Password>string</Password>
</MarketValue>
</soap12:Body>
</soap12:Envelope>
The Response template is as follows:
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<MarketValueResponse xmlns="http://tsetmc.com/">
<MarketValueResult>decimal</MarketValueResult>
</MarketValueResponse>
</soap12:Body>
</soap12:Envelope>