Client Proxy generated for wsdl with minOccurs=0 for value types.
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 576
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 2
Description
Hi,
I have a wsdl file that I am migrating from the old netframework "svcutil" tool to the new "dotnet-svcutil" tool.
The old tool use to create client proxy methods with an additional "Specified" parameter for parameters that are value types, and are marked as optional (minOccurs=0) in the wsdl. The new tool doesn't seem to create the additional "Specified" parameter, so its not possible to call the webservice with the parameter "not specified".
Specifically, I am referring to a wsdl file from a VMWare SDK (VimService.wsdl), and an example method that gets generated in the proxy code is...
Old:
`public VimApi.PerfMetricId[] QueryAvailablePerfMetric(VimApi.ManagedObjectReference _this, VimApi.ManagedObjectReference entity, System.DateTime beginTime, bool beginTimeSpecified, System.DateTime endTime, bool endTimeSpecified, int intervalId, bool intervalIdSpecified)`
New:
`public VimApi.PerfMetricId[] QueryAvailablePerfMetric(VimApi.ManagedObjectReference _this, VimApi.ManagedObjectReference entity, System.DateTime beginTime, System.DateTime endTime, int intervalId)`
I'm specifying the following parameters when running the dotnet-svcutil tool:
`--serializer XmlSerializer --sync --targetFramework netstandard2.0 --namespace *,VimApi`
I have not included the original wsdl file in this initial report as it is large, and I'm not sure if its needed to reproduce the issue.
Contributor guide
Assessment
This issue has not been assessed yet.