If it concerns interaction with the SOAP service, please use Add Service Link or wsdl.exe .
If it is only an XML parsing, assuming you got a SOAP response in an XDocument called soapDocument:
XNamespace ns = "http://ASR-RT/"; var objIns = from objIn in soapDocument.Descendants(ns + "objIn") let header = objIn.Element(ns + "transactionHeaderData") select new { WebsiteId = (int) header.Element(ns + "intWebsiteId"), VendorData = header.Element(ns + "strVendorData").Value, VendorId = header.Element(ns + "strVendorId").Value, CCN = (int) objIn.Element(ns + "intCCN"), SurveyResponse = objIn.Element(ns + "strSurveyResponseFlag").Value, };
This will give you IEnumerable anonymous types that you are dealing with fully strongly typed objects in this method.
source share