deserialize xml into class - debug my code, real quick project

Closed - This job posting has been filled and work has been completed.
Web, Mobile & Software Dev Desktop Software Development Posted 2 years ago

Fixed Price

Delivery by June 4, 2013

$10.00

Budget

Details

Hi,
I am having an issue de-serializing my xml into a class.  I am almost done, I just need someone to help out.  This should be easy and only take a very short time, way less than an hour.

I will attach the xml.  I can only upload one file so I can send the class later.  Here is the function that I can't get to work:

        public static OrderResponse GetOrderResponseFromXml(string xml)
        {
            OrderResponse responseObject = new OrderResponse();
            try
            {
                var xSerializer = new XmlSerializer(typeof(OrderResponse), new XmlRootAttribute("order-wrapper"));
                using (var reader = new StringReader(xml))
                {
                    XmlSerializer serializer = new XmlSerializer(typeof(OrderResponse));
                    responseObject = (OrderResponse)serializer.Deserialize(reader); //this gives serializer the part of XML that is for  the innerObject data
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
            return responseObject;
        }


About the Client

(4.80) 14 reviews

United States
Boston 11:38 PM

18 Jobs Posted
95% Hire Rate, 1 Open Job

$292 Total Spent
18 Hires, 0 Active

$11.41/hr Avg Hourly Rate Paid
18 Hours

Member Since Apr 28, 2010