Skip to content

Commit

Permalink
Merge pull request #911 from ArtemevAL/patch-1
Browse files Browse the repository at this point in the history
Remove import contract namespace as this results in a stack overflow
  • Loading branch information
andersjonsson authored Oct 20, 2022
2 parents 0a2cfec + f2b6908 commit 10d4464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SoapCore/Meta/MetaWCFBodyWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ private void AddContractOperations(XmlDictionaryWriter writer, ContractDescripti

var groupedByNamespace = _complexTypeToBuild.GroupBy(x => x.Value).ToDictionary(x => x.Key, x => x.Select(k => k.Key));

foreach (var @namespace in groupedByNamespace.Keys.Where(x => x != null && x != _service.ServiceType.Namespace).Distinct())
foreach (var @namespace in groupedByNamespace.Keys.Where(x => x != null && x != _service.ServiceType.Namespace && x != contract.Namespace).Distinct())
{
writer.WriteStartElement("xs", "import", Namespaces.XMLNS_XSD);
writer.WriteAttributeString("namespace", @namespace);
Expand Down

0 comments on commit 10d4464

Please sign in to comment.