We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi. I found that SoapCore ignores the Name property specified in DataContractAttribute for generic type. Here is an example:
[ServiceContract] public interface IMyService { [OperationContract] MyType<int, string> Test(); } public class MyService : IMyService { public MyType<int, string> Test() => new(); } [DataContract(Name = "MyType")] public class MyType<TKey, TValue> { [DataMember] public TKey? Key { get; set; } [DataMember] public TValue? Value { get; set; } }
The produced wsdl refers to the auto-generated name "MyTypeOfInt32String" instead of the "MyType" name specified in the DataContract.Name property.
<xs:element name="TestResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="1" name="TestResult" nillable="true" type="q1:MyTypeOfInt32String"/> </xs:sequence> </xs:complexType> </xs:element>
I wrote a small fix, based on the CollectionDataContract.Name processing code. #1068
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Hi. I found that SoapCore ignores the Name property specified in DataContractAttribute for generic type. Here is an example:
The produced wsdl refers to the auto-generated name "MyTypeOfInt32String" instead of the "MyType" name specified in the DataContract.Name property.
I wrote a small fix, based on the CollectionDataContract.Name processing code.
#1068
The text was updated successfully, but these errors were encountered: