Read SOAP message response ASP.NET MVC4 C#

I have a remotely hosted XML SOAP message which I need to read within my ASP.NET MVC C# web application. I am new to ALL of the above technologies so please go easy on me.[*]How do I connect to the data source[*]How do I create a model to model the SOAP message[*]What is the LinQ query I would need to turn get the contents of "GetMetalQuoteResult" into a C# object? e.g. Gain access to the individual elements of the soap message response.Schema below.\[code\]<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetMetalQuoteResponse xmlns="http://.../..."> <GetMetalQuoteResult> <Type>string</Type> <Currency>string</Currency> <Date>Date</Date> <Time>Time</Time> <Rate>decimal</Rate> <Bid>decimal</Bid> <BidTime>Time</BidTime> <ExpTime>DateTime</ExpTime> <DisplayTime>Time</DisplayTime> <DisplayDate>Date</DisplayDate> <Ask>Decimal</Ask> <AskTime>Time</AskTime> </GetMetalQuoteResult> </GetMetalQuoteResponse> </soap:Body></soap:Envelope>\[/code\]At present, I have the following code within my controller.\[code\] var xml = XElement.Load(url); System.Diagnostics.Debug.WriteLine(""); foreach (XElement x in xml.Nodes()) { System.Diagnostics.Debug.WriteLine(x.Name + ":\n"+ x.Value); } System.Diagnostics.Debug.WriteLine("");\[/code\]But this just returns the following:\[code\]{http://schemas.xmlsoap.org/soap/envelope/}Body:XAUGBP5/22/201212:21:04 PM1000.86251000.862512:21:04 PM2012 May 22 12:21 PM BST1:21:04 PM EDT05/22/121001.249412:21:04 PM\[/code\]I need it to return on a separate line:\[code\]Type: XAUCurrency: GBPDate: 5/22/201212:21:04........\[/code\]Thanks in advance for your help.
 
Back
Top