Reputation: 65
How can I parse the following soap response string to c# objects and get the values of "applicationUrl" and "applicationValue"?
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header>
</env:Header>
<env:Body>
<ns2:getAdvertisementsResponse xmlns:ns2="http://ws.mrted.com/">
<ns2:advertisementResult>
<advertisements>
<advertisement>
<applicationUrl>
http://test.com
</applicationUrl>
<applicationValue>
test
</applicationValue>
</advertisement>
</advertisements>
<totalResults>2</totalResults>
</ns2:advertisementResult>
</ns2:getAdvertisementsResponse>
</env:Body>
Upvotes: 0
Views: 1152
Reputation: 2339
If the service provider is giving you a WSDL, the first thing I would try is the Web Services Description Language Tool (Wsdl.exe):
https://msdn.microsoft.com/en-us/library/7h3ystb6(v=vs.80).aspx
The Web Services Description Language tool generates code for XML Web services and XML Web service clients from WSDL contract files, XSD schemas, and .discomap discovery documents.
Upvotes: 2