dotnet / dotnet/wcf

connected service doesn't handle nillable date's (works on full framework - old known .NET FX issue?).

Open
#2,547 3 comments 1 reaction 0 assignees View on GitHub
Backlog bug priority 2 tooling
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

i have a old legacy "Service Reference" style wcf client that is working with this wsdl correctly (i made sure it was updated for the current published wsdl)
and when trying to convert all the old legacy stuff to the new "Connected Services" it fails to properly handle because the wsdl has Nullable's inside (thanks java....)

wsdl https://ws.tradetracker.com/soap/merchant?wsdl

**repo code**
```
// setup the client
var soapClient = new MerchantInterfaceClient(
new BasicHttpBinding(BasicHttpSecurityMode.Transport) { AllowCookies = true, MaxReceivedMessageSize = 1024 * 10 * 10 * 10 },
new EndpointAddress(new Uri("https://ws.tradetracker.com/soap/merchant")));

// replace "nl_NL" with "Locale.nl_NL" when using the old net461 wcf service reference
var tsk = soapClient.authenticateAsync("123456", "12345abcdefghijklmnopqrstuvwxyz123456789", true, "nl_NL", false);
tsk.Wait();

```
**expected result** (because these credentials are fake of course)

> FaultException: Failed to authenticate.

**actual result**
`System.InvalidOperationException: ''date' is an invalid value for the SoapElementAttribute.DataType property. The property may only be specified for primitive types.'`

netstandard2.0, visual studio 2017 (with the latest updates, etc etc)

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.