Solved

WCF REST convert to object

Posted on 2011-03-22
1
415 Views
Last Modified: 2012-08-13
Hello,

I have created a service WCF REST.
I execute my service with this url:
https://www.myweb.com/myservice.svc/ReadClient/const/1/10
And the service return sucesfully a xml with my object

My question is:  When execute this url (service) in .net (c#), what can I convert this xml in my original object?

Thanks!
0
Comment
Question by:david-shm
1 Comment
 
LVL 3

Accepted Solution

by:
KBerger earned 500 total points
ID: 36985009
Hi,

as REST Services do not expose meta-data to build proxy-classes on, you will have to implement the conversion by yourself. You could do this by using an XmlReader which reads the Xml and rebuilds the objects according to the nodes.
You could also build Deserialization-methods which either consume an XmlDocument or XmlNodes.

Hope that helps you out.

Regards,

Kristof
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This tutorial will show you how to add an attribute to an XML (http://en.wikipedia.org/wiki/XML) stream returned from a Windows Communication Foundation (http://en.wikipedia.org/wiki/Windows_Communication_Foundation) (WCF) Web Service.  Some knowled…
In previous Articles, we have discussed how we can upload a file using .asmx web service and isolated storage space. Here, in continuation to the topic, I am going to discuss how we can use WCF for the same purpose. Steps: 1.Create the silverli…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now