Can you please help.
I've got a Visual Studio WCF project (.NET: 4.7.2, Language: C#) where I am using [ServiceContract], [DataContract] and [MessageContract] attributes to generate WSDL from the classes implementing the services (see attached file).
The WSDL generated by WCF contains the following unnecessary parts, items. How can I get rid of these?
Some XML namespace-es which are not used in the WSDL (eg. xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd")
A complete <xs:schema> section that defines the base types as elements.
Some types are also defined as elements though the SOAP message does not contain them as elements (eg. type="q2:AsyncReportRequest")
The SOAP message elements defined by [MessageBodyMember] attributes inside a [MessageContract] decorated class are defined as optional in the WSDL (Eg. <xs:element minOccurs="0" name="callContext" nillable="true" type="q1:callContext">). I found no option on the attributes to specify "required".
I've already studied all properties of the decorating attribute classes and found no solution.
I've also looked at the possibilities of IWsdlExportExtension to extend WCF on the WSDL export functionality but I couldn't find a solution for changing the way WCF handles and generates these parts. I could only find description for adding additional information to the WSDL by defining custom attributes.
Thank you for helping, regards,
ps. I put the tag windows-runtime because wcf is not available in the tags list. Actually not many things are available, why is that?