Svcutil.exe
We can also create a ProductReview class from the schema definition. This is the inverse of the process that created a data contract based on the xsd
Links and references
ServiceModel Metadata Utility Tool (Svcutil.exe) - https://msdn.microsoft.com/en-us/library/aa347733(v=vs.110).aspx
Creating data contract from service assembly
We can create a schema definition from the Service assembly
- Create a WCF Service and build it. Ensure that its working correctly.
- Open developer command prompt
- Navigate to the bin/Debug folder of the project
- Execute the command svcutil /dconly ProductServiceLibrary.dll
- This should create a bunch of files
- Open ProductServiceLibrary.xsd in notepad
We can also create a ProductReview class from the schema definition. This is the inverse of the process that created a data contract based on the xsd
- Go back to developer command prompt and run the following command
- svcutil /dconly ProductServiceLibrary.xsd
- Notice that the above command creates a cs file called ProductServiceLibrary.cs
Links and references
ServiceModel Metadata Utility Tool (Svcutil.exe) - https://msdn.microsoft.com/en-us/library/aa347733(v=vs.110).aspx
Comments
Post a Comment