Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have complex type (EmployeeInfo) defined in an .xsd file. So how can i use that type in my C# Web Service class? I already done lot of search on Google but can't find proper information.
Thanks in advance.
Posted
Comments
Umesh AP 25-Mar-15 5:28am    
Hi, waiting for experts reply on this question. Can I directly use such complex type in my web service?
johannesnestler 25-Mar-15 11:17am    
Hi, in a WCF Service Project under "WCF-Options" you find a Checkbox like "Activate XSD as typedefinition language" (don't know the exact wording in english). If enabled you can add a XSD file to your Service Project and you get a generated class corresponding to your xsd. Should be simple...
Umesh AP 26-Mar-15 1:15am    
@Johannesnestler, I am not developing WCF application. I am creating simple web service & want to access that complex type in my web service method.
johannesnestler 26-Mar-15 6:47am    
sorry didn't see that. See my answer

1 solution

So you can use the xsd Tool manually to generate the classes.
See https://msdn.microsoft.com/en-us/library/x6c1kb0s(v=VS.100).aspx[^]
for documentation.
You find the tool in the .NET SDK Folder. E.g C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900