I have a WCF service with a mex endpoint for metadata. I use the SvcUtil through visual studio to generate client data contracts code (C#) while the service is running. SvcUtil adds KnownType attributes for the inherited and referenced types. I have a custom data contract resolver and have no use for these Known Types. How can I make SvcUtil or the WSDL Importer not tag all these types with KnownType attributes? My worst case scenario is to go through the file after code generation and remove these attributes, but I am hoping there is a cleaner way to do this.
Scraping KnownType attributes during SvcUtil and WSDL Code generation
324 Views Asked by LadderLogic At
1
There are 1 best solutions below
Related Questions in .NET
- Does compiler optimize operation on const variable and literal const number?
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- Deleting Orphans with Fluent NHibernate
- IOrderedEnumerable to vb.net IOrderedEnumerable Conversion
- What is this namespace ITypeOfObjectsBoundToListBox ? Couldn't find it
- .net rest service with JSON string and consumed with java client
- What is best way to check if any of the property of object is null or empty?
- Telerik's WPF RadColorPicker NoColorText property not working
- Possible consequences of duplicate ProgId for different classes
- How are multiple requests to Task.Run handled from a resource management standpoint?
- Optimizing C++ call from C#
- Make a per-web-application object available to Web API and SignalR controllers
- System.ComponentModel.DataAnnotations.Schema namespace conflict
- LINQ Except/Distinct based on few columns only, to not add duplicates
- Not displaying content by its URL string - absolute urls
Related Questions in WCF
- couldn't copy pdb file to another directory while consuming wcf web service
- Call wcf from android app
- WCF Service not accepting multiple body parameters
- Error in Calling some service in WCF Client
- WCF channel Factory caching
- How to convert a List<string> to an IEnumerable<ServiceReference.datatable> C# Silverlight WCF RIA Services LINQ to SQL
- WCF reusing types with inheritance - cannot generate client code
- System.ServiceModel.FaultException'1' Where might the error be?
- How to configure proxy address for multiple WCF-bindings at once?
- How pass XML from PHP to the Soap WCF service?
- Multiple service contract inter-commnication
- WCF Service not returning virtual property ServiceProvider
- How to get information about error from HttpContext in WCF services
- Using Service Bus to access On Premise WCF Service
- Test case for WCF REST Service
Related Questions in WSDL
- Error with kSOAP2
- Namespace for array field in node-soap client (Node.js)
- Generate clients for multiple WSDL files and place it in different package through Spring Gradle
- How to publish wsdl when using different endpoints in proxy with WSO2?
- Calling Java webservice (wsdl) from VB.net
- JAX-WS WebService via CXF provides inaccurate wsdl
- How to merge two wsdl in a wsdl file?
- Building XSD for secific xml
- SOAP Implementation in Forms Project
- Why does C# Web Client display ? for French Characters?
- Accessing SOAP webservices on https protocol throws Exception SOAP-ERROR: Parsing WSDL
- SOAP Fault: Security requirements are not satisfied because the security header is not present in the incoming message
- How to do authentication using SOAP Header and PHP?
- How to call web services from WSDL?
- Array structure to specify Fedex One Rate using Fedex API RateService
Related Questions in SVCUTIL.EXE
- How does the svcutil (WCF) create task based methods for every service?
- wcf service don't send element even the service xsd element has minOccurs and nillable in default values
- Create a proxy class with summary from a wsdl using svcutil
- How to reuse all assembly types in svcutil and specify a dictionary collection type?
- svcutil not exporting metadata for generic DataContract types
- SvcUtil and /dconly generates XSD's for data types NOT marked with the DataContract attribute
- How to determine what schema files (xsd) to include on my svcutil command line?
- Use svcutil.exe with a webproxy
- svcutil not generate the complextype which wrap an array of another type with /xmlserializer sometimes
- Why might VS "Add Service Reference" not generate interfaces for servicecontracts that svcutil recognizes just fine?
- why is proxy code Generated by svctuil so small?
- svcutil ignores WS-Trust Claims
- Creating shared data transfer classes generated by svcutil /datacontractonly and used in WCF web programming model
- Do i have to include xml namespaces in the svcutil.exe command?
- Deserialize object with XmlAnyElementAttribute not working
Related Questions in KNOWN-TYPES
- Serialize delivered class's instance using DataContract
- Merge anonymous lead with known lead with Marketo REST API
- using or not using the KnownType attribute between servers?
- Apply KnownTypeAttribute to Object type?
- Polymorphism WCF deserialization doesn't work
- WCF: not deserializing knowntype in array as derived class, unsure how to debug datacontractserializer
- Scraping KnownType attributes during SvcUtil and WSDL Code generation
- Multiple known types ArrayOfstring on IService methods
- WCF Derived types and violation of the Open/Closed principle
- Why is ServiceKnownType not needed for my object?
- WCF KnownTypes in Mono 2.10 / MonoTouch 4.0
- WCF - Retrieve Types from server in client
- Receive class inherited from WCF Service when KnownType Class is in another project?
- How to add service known types from external config file
- WCF contracts - namespaces and SerializationExceptions
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
One option would be to add the known types to a configuration file. The configuration file doesn't need to be your app.config (or web.config). It could be called
dummy.config.When you run svcutil.exe, add the following parameter
/svcutilConfig:dummy.config. When the client code is generated, your KnownType attributes should go away.Here's another example of registering known types using a configuration file.