0

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>
  • Have you tried looking up a solution. https://salesforce.stackexchange.com/a/189512 – Jawad Dec 30 '19 at 17:35
  • Does this answer your question? [SOAP client in .NET - references or examples?](https://stackoverflow.com/questions/3100458/soap-client-in-net-references-or-examples) – Jawad Dec 30 '19 at 17:37
  • @Jawad Thanks but I couldn't understand how to do so :( – user2957386 Dec 30 '19 at 17:39

0 Answers0