November 13, 2012 by Ravi C Khambhati
Today I was working on SharePoint web service and if you guys have worked on SharePoint or any other Web Service you must be familiar with the XML response returned by service.
So I thought of doing De-serialize response to .NET object and started with creating classes. After some time I realized that its talking lot of time because each response is different. So I started doing googling and found the solution for the same.
So here are the steps
1. Call function of service and store the response in myFunction.xml file
2. Open Visual Studio command prompt
3. Type “xsd.exe myFunction.xml” and press enter
4. Step 3 will generate myFunction.xsd file(Schema file)
5. Type “xsd.exe myFunction.xsd /classes” and press enter
6. Step 5 will generate myFunction.cs file
So here we are ready with the classes for deserialization.
You can get more details about XSD.exe tool at below URL
I hope this will help while working with Web Service.