When utilizing the SoapCore library in an ASP.NET Core service, use the XmlType attribute with the Namespace property set to the desired namespace for the DeliveryType class in order to include a specific namespace for the types in the WSDL specification. Nevertheless, creating distinct schema documents for every namespace is not supported by SoapCore. Use a different SOAP library or generate the WSDL by hand if you require distinct schema documents.
[Serializable]
[XmlType("deliveryType", Namespace = "http://www.ech.ch/xmlns/eCH-0020-f/3")]
public class DeliveryType
{
[XmlAttribute(AttributeName = "Test")]
public string Test { get; set; }
}