Open scrodde opened 5 years ago
@mlacouture can you review this issue? This seems like a product bug. Should it be moved somewhere else?
@dasetser who owns this now.
@scrodde Since this issue is for the product rather than the documentation please open an issue on the WCF Core Github: https://github.com/dotnet/wcf/. When you open that issue can you also include information on if this works correctly if you use the normal svcutil and a full framework client? If we can confirm there's a difference in behavior it will be easier for us to investigate the cause of this.
I've transferred the issue to the requested repo @dasetser.
@scrodde did you manage to work your way around this? Seems that we are contacting the exact same endpoint and hit this very issue...
@imcarolwang can you please see if there is behavior change from .NET framework?
There is behavior change from Framework in XmlSerializer
serializing byte[]
type to soap xml.
In .Net Core, for a target class FileAttachment
which has SoapTypeAttribute
applied, if its public property byte[] File
has applied [SoapElement(DataType = "base64Binary")]
or none, the serialization result would be missing XsiType info, if applying the property with [SoapElement(DataType = "hexBinary")]
then the XsiType info would be generated when serialized.
In .Net Framework, XsiType is always generated for the byte[] property in the serialization result as long as its containing class has SoapTypeAttribute
applied.
Bug: The generated client request is missing the
xsi:type="n1:base64" xmlns:n1="http://schemas.xmlsoap.org/soap/encoding/"
attribute on its<file />
element. The attribute specification is defined in the schema.Schema: https://testing.maventa.com/apis/v1.1/wsdl
Generated request:
Expected request:
WSDL: https://testing.maventa.com/apis/v1.1/wsdl Version: [Microsoft.Tools.ServiceModel.Svcutil, Version 2.0.0]
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.