dotnet / dotnet/wcf

dotnet-svcutil generating redundant response wrapper classes

Open
#4,249 0 comments 6 reactions 0 assignees View on GitHub
enhancement tooling
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

**Describe the bug**
dotnet-svcutil is generating (what appear to be) redundant wrapper classes around response objects for some APIs

**To Reproduce**
1. Execute `dotnet-svcutil http://api.exigo.com/3.0/?wsdl`
2. Open ServiceReference\Reference.cs
3. See `ExigoApiSoapClient.AuthenticateUserAsync(ApiAuthentication, AuthenticateUserRequest)`, for me this appears on line 83348.
4. The (awaited) return value is an instance of `AuthenticateUserResponse1` which has only one property: `AuthenticateUserResponse AuthenticateUserResult`.

**Expected behavior**
`AuthenticateUserResponse1` should not be generated, and `ExigoApiSoapClient.AuthenticateUserAsync(ApiAuthentication, AuthenticateUserRequest)` should return `AuthenticateUserResponse` (after awaiting).

**Additional context**
I also commented on this very old issue, which appears to be identical, but has been closed without a solution: https://github.com/dotnet/wcf/issues/2670

Is this a side effect of that particular WSDL? Is the WSDL malformed?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.