diff --git a/src/SoapCore/Meta/MetaWCFBodyWriter.cs b/src/SoapCore/Meta/MetaWCFBodyWriter.cs index 2af216ff..1edb78f6 100644 --- a/src/SoapCore/Meta/MetaWCFBodyWriter.cs +++ b/src/SoapCore/Meta/MetaWCFBodyWriter.cs @@ -190,6 +190,8 @@ private void WriteParameters(XmlDictionaryWriter writer, SoapMethodParameterInfo { foreach (var parameterInfo in parameterInfos) { + if (parameterInfo.Parameter.ParameterType.FullName == "System.Threading.CancellationToken") + continue; var elementAttribute = parameterInfo.Parameter.GetCustomAttribute(); var parameterName = !string.IsNullOrEmpty(elementAttribute?.ElementName) ? elementAttribute.ElementName @@ -268,6 +270,8 @@ private void AddContractOperations(XmlDictionaryWriter writer, ContractDescripti { var type = parameter.Parameter.ParameterType; var typeInfo = type.GetTypeInfo(); + if (typeInfo.FullName == "System.Threading.CancellationToken") + continue; if (typeInfo.IsByRef) { type = typeInfo.GetElementType();