title: .NET 5.0 and SOAP Web services
body: <p>Finally managed to figure it out whilst I was writing this question! Thought I'd still post it encase helped any others out.</p>
  <p><strong>The problem:</strong></p>
  <p>I'm upgrading my Windows Service from <code>.NET Framework 4.x</code> to <code>.NET 5.0</code> which uses Hangfire to automate scheduled tasks in .NET and one of the tasks is talking to web service within SAP.</p>
  <p>One of the automated jobs consumes SOAP service from SAP I but can't use it in <code>.NET 5.0</code> or <code>.NET Core 3.1</code> but I can use it with <code>.NET Framework</code></p>
  <p>There is quite a few bespoke SAP services we're consuming. However, this is the most simple one. Here is the WSDL (Did remove the binding URL and identity property):</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;wsdl:definitions xmlns:wsdl=&quot;http://schemas.xmlsoap.org/wsdl/&quot; xmlns:http=&quot;http://schemas.xmlsoap.org/wsdl/http/&quot; xmlns:mime=&quot;http://schemas.xmlsoap.org/wsdl/mime/&quot; xmlns:n1=&quot;urn:sap-com:document:sap:rfc:functions&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot; xmlns:tns=&quot;urn:sap-com:document:sap:soap:functions:mc-style&quot; xmlns:wsoap12=&quot;http://schemas.xmlsoap.org/wsdl/soap12/&quot; xmlns:wsp=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy&quot; xmlns:wsu=&quot;http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; targetNamespace=&quot;urn:sap-com:document:sap:soap:functions:mc-style&quot;&gt;
     &lt;wsdl:documentation&gt;
        &lt;sidl:sidl xmlns:sidl=&quot;http://www.sap.com/2007/03/sidl&quot; /&gt;
     &lt;/wsdl:documentation&gt;
     &lt;wsp:UsingPolicy wsdl:required=&quot;true&quot; /&gt;
     &lt;wsp:Policy wsu:Id=&quot;BN__Z_DATA_FEEDS&quot;&gt;
        &lt;wsp:ExactlyOne&gt;
           &lt;wsp:All&gt;
              &lt;sapattahnd:Enabled xmlns:sapattahnd=&quot;http://www.sap.com/710/features/attachment/&quot;&gt;false&lt;/sapattahnd:Enabled&gt;
              &lt;saptrnbnd:OptimizedMimeSerialization xmlns:saptrnbnd=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization&quot; wsp:Optional=&quot;true&quot; /&gt;
              &lt;wsaw:UsingAddressing xmlns:wsaw=&quot;http://www.w3.org/2006/05/addressing/wsdl&quot; wsp:Optional=&quot;true&quot; /&gt;
              &lt;wsp:All&gt;
                 &lt;sp:TransportBinding xmlns:sp=&quot;http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&quot; xmlns:sapsp=&quot;http://www.sap.com/webas/630/soap/features/security/policy&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot; xmlns:wst=&quot;http://docs.oasis-open.org/ws-sx/ws-trust/200512&quot; xmlns:wsu=&quot;http://schemas.xmlsoap.org/ws/2002/07/utility&quot; xmlns:wsx=&quot;http://schemas.xmlsoap.org/ws/2004/09/mex&quot;&gt;
                    &lt;wsp:Policy&gt;
                       &lt;sp:TransportToken&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:HttpsToken&gt;
                                &lt;wsp:Policy&gt;
                                   &lt;sp:HttpBasicAuthentication /&gt;
                                &lt;/wsp:Policy&gt;
                             &lt;/sp:HttpsToken&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:TransportToken&gt;
                       &lt;sp:AlgorithmSuite&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:Basic128Rsa15 /&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:AlgorithmSuite&gt;
                       &lt;sp:Layout&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:Strict /&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:Layout&gt;
                    &lt;/wsp:Policy&gt;
                 &lt;/sp:TransportBinding&gt;
              &lt;/wsp:All&gt;
           &lt;/wsp:All&gt;
           &lt;wsp:All&gt;
              &lt;sapattahnd:Enabled xmlns:sapattahnd=&quot;http://www.sap.com/710/features/attachment/&quot;&gt;false&lt;/sapattahnd:Enabled&gt;
              &lt;saptrnbnd:OptimizedXMLTransfer xmlns:saptrnbnd=&quot;http://www.sap.com/webas/710/soap/features/transportbinding/&quot; uri=&quot;http://xml.sap.com/2006/11/esi/esp/binxml&quot; wsp:Optional=&quot;true&quot; /&gt;
              &lt;wsaw:UsingAddressing xmlns:wsaw=&quot;http://www.w3.org/2006/05/addressing/wsdl&quot; wsp:Optional=&quot;true&quot; /&gt;
              &lt;wsp:All&gt;
                 &lt;sp:TransportBinding xmlns:sp=&quot;http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&quot; xmlns:sapsp=&quot;http://www.sap.com/webas/630/soap/features/security/policy&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot; xmlns:wst=&quot;http://docs.oasis-open.org/ws-sx/ws-trust/200512&quot; xmlns:wsu=&quot;http://schemas.xmlsoap.org/ws/2002/07/utility&quot; xmlns:wsx=&quot;http://schemas.xmlsoap.org/ws/2004/09/mex&quot;&gt;
                    &lt;wsp:Policy&gt;
                       &lt;sp:TransportToken&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:HttpsToken&gt;
                                &lt;wsp:Policy&gt;
                                   &lt;sp:HttpBasicAuthentication /&gt;
                                &lt;/wsp:Policy&gt;
                             &lt;/sp:HttpsToken&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:TransportToken&gt;
                       &lt;sp:AlgorithmSuite&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:Basic128Rsa15 /&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:AlgorithmSuite&gt;
                       &lt;sp:Layout&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:Strict /&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:Layout&gt;
                    &lt;/wsp:Policy&gt;
                 &lt;/sp:TransportBinding&gt;
              &lt;/wsp:All&gt;
           &lt;/wsp:All&gt;
        &lt;/wsp:ExactlyOne&gt;
     &lt;/wsp:Policy&gt;
     &lt;wsp:Policy wsu:Id=&quot;BN__Z_DATA_FEEDS_soap12&quot;&gt;
        &lt;wsp:ExactlyOne&gt;
           &lt;wsp:All&gt;
              &lt;sapattahnd:Enabled xmlns:sapattahnd=&quot;http://www.sap.com/710/features/attachment/&quot;&gt;false&lt;/sapattahnd:Enabled&gt;
              &lt;saptrnbnd:OptimizedMimeSerialization xmlns:saptrnbnd=&quot;http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization&quot; wsp:Optional=&quot;true&quot; /&gt;
              &lt;wsaw:UsingAddressing xmlns:wsaw=&quot;http://www.w3.org/2006/05/addressing/wsdl&quot; wsp:Optional=&quot;true&quot; /&gt;
              &lt;wsp:All&gt;
                 &lt;sp:TransportBinding xmlns:sp=&quot;http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&quot; xmlns:sapsp=&quot;http://www.sap.com/webas/630/soap/features/security/policy&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot; xmlns:wst=&quot;http://docs.oasis-open.org/ws-sx/ws-trust/200512&quot; xmlns:wsu=&quot;http://schemas.xmlsoap.org/ws/2002/07/utility&quot; xmlns:wsx=&quot;http://schemas.xmlsoap.org/ws/2004/09/mex&quot;&gt;
                    &lt;wsp:Policy&gt;
                       &lt;sp:TransportToken&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:HttpsToken&gt;
                                &lt;wsp:Policy&gt;
                                   &lt;sp:HttpBasicAuthentication /&gt;
                                &lt;/wsp:Policy&gt;
                             &lt;/sp:HttpsToken&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:TransportToken&gt;
                       &lt;sp:AlgorithmSuite&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:Basic128Rsa15 /&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:AlgorithmSuite&gt;
                       &lt;sp:Layout&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:Strict /&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:Layout&gt;
                    &lt;/wsp:Policy&gt;
                 &lt;/sp:TransportBinding&gt;
              &lt;/wsp:All&gt;
           &lt;/wsp:All&gt;
           &lt;wsp:All&gt;
              &lt;sapattahnd:Enabled xmlns:sapattahnd=&quot;http://www.sap.com/710/features/attachment/&quot;&gt;false&lt;/sapattahnd:Enabled&gt;
              &lt;saptrnbnd:OptimizedXMLTransfer xmlns:saptrnbnd=&quot;http://www.sap.com/webas/710/soap/features/transportbinding/&quot; uri=&quot;http://xml.sap.com/2006/11/esi/esp/binxml&quot; wsp:Optional=&quot;true&quot; /&gt;
              &lt;wsaw:UsingAddressing xmlns:wsaw=&quot;http://www.w3.org/2006/05/addressing/wsdl&quot; wsp:Optional=&quot;true&quot; /&gt;
              &lt;wsp:All&gt;
                 &lt;sp:TransportBinding xmlns:sp=&quot;http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702&quot; xmlns:sapsp=&quot;http://www.sap.com/webas/630/soap/features/security/policy&quot; xmlns:wsa=&quot;http://www.w3.org/2005/08/addressing&quot; xmlns:wst=&quot;http://docs.oasis-open.org/ws-sx/ws-trust/200512&quot; xmlns:wsu=&quot;http://schemas.xmlsoap.org/ws/2002/07/utility&quot; xmlns:wsx=&quot;http://schemas.xmlsoap.org/ws/2004/09/mex&quot;&gt;
                    &lt;wsp:Policy&gt;
                       &lt;sp:TransportToken&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:HttpsToken&gt;
                                &lt;wsp:Policy&gt;
                                   &lt;sp:HttpBasicAuthentication /&gt;
                                &lt;/wsp:Policy&gt;
                             &lt;/sp:HttpsToken&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:TransportToken&gt;
                       &lt;sp:AlgorithmSuite&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:Basic128Rsa15 /&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:AlgorithmSuite&gt;
                       &lt;sp:Layout&gt;
                          &lt;wsp:Policy&gt;
                             &lt;sp:Strict /&gt;
                          &lt;/wsp:Policy&gt;
                       &lt;/sp:Layout&gt;
                    &lt;/wsp:Policy&gt;
                 &lt;/sp:TransportBinding&gt;
              &lt;/wsp:All&gt;
           &lt;/wsp:All&gt;
        &lt;/wsp:ExactlyOne&gt;
     &lt;/wsp:Policy&gt;
     &lt;wsp:Policy wsu:Id=&quot;IF__Z_DATA_FEEDS&quot;&gt;
        &lt;wsp:ExactlyOne&gt;
           &lt;wsp:All&gt;
              &lt;sapsession:Session xmlns:sapsession=&quot;http://www.sap.com/webas/630/soap/features/session/&quot;&gt;
                 &lt;sapsession:enableSession&gt;false&lt;/sapsession:enableSession&gt;
              &lt;/sapsession:Session&gt;
              &lt;sapcentraladmin:CentralAdministration xmlns:sapcentraladmin=&quot;http://www.sap.com/webas/700/soap/features/CentralAdministration/&quot; wsp:Optional=&quot;true&quot;&gt;
                 &lt;sapcentraladmin:BusinessApplicationID&gt;#### REMOVED ####&lt;/sapcentraladmin:BusinessApplicationID&gt;
              &lt;/sapcentraladmin:CentralAdministration&gt;
           &lt;/wsp:All&gt;
        &lt;/wsp:ExactlyOne&gt;
     &lt;/wsp:Policy&gt;
     &lt;wsp:Policy wsu:Id=&quot;OP__ZOrderStatus&quot;&gt;
        &lt;wsp:ExactlyOne&gt;
           &lt;wsp:All&gt;
              &lt;saptrhnw05:required xmlns:saptrhnw05=&quot;http://www.sap.com/NW05/soap/features/transaction/&quot;&gt;no&lt;/saptrhnw05:required&gt;
              &lt;sapcomhnd:enableCommit xmlns:sapcomhnd=&quot;http://www.sap.com/NW05/soap/features/commit/&quot;&gt;false&lt;/sapcomhnd:enableCommit&gt;
              &lt;sapblock:enableBlocking xmlns:sapblock=&quot;http://www.sap.com/NW05/soap/features/blocking/&quot;&gt;true&lt;/sapblock:enableBlocking&gt;
              &lt;saprmnw05:enableWSRM xmlns:saprmnw05=&quot;http://www.sap.com/NW05/soap/features/wsrm/&quot;&gt;false&lt;/saprmnw05:enableWSRM&gt;
           &lt;/wsp:All&gt;
        &lt;/wsp:ExactlyOne&gt;
     &lt;/wsp:Policy&gt;
     &lt;wsdl:types&gt;
        &lt;xsd:schema attributeFormDefault=&quot;qualified&quot; targetNamespace=&quot;urn:sap-com:document:sap:rfc:functions&quot;&gt;
           &lt;xsd:simpleType name=&quot;char10&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;10&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;char50&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;50&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;cuky5&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;5&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;curr15.2&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:decimal&quot;&gt;
                 &lt;xsd:totalDigits value=&quot;15&quot; /&gt;
                 &lt;xsd:fractionDigits value=&quot;2&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;date10&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;10&quot; /&gt;
                 &lt;xsd:pattern value=&quot;\d\d\d\d-\d\d-\d\d&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;quantum13.3&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:decimal&quot;&gt;
                 &lt;xsd:totalDigits value=&quot;13&quot; /&gt;
                 &lt;xsd:fractionDigits value=&quot;3&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;unit3&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;3&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
        &lt;/xsd:schema&gt;
        &lt;xsd:schema xmlns:n0=&quot;urn:sap-com:document:sap:rfc:functions&quot; attributeFormDefault=&quot;qualified&quot; targetNamespace=&quot;urn:sap-com:document:sap:soap:functions:mc-style&quot;&gt;
           &lt;xsd:import namespace=&quot;urn:sap-com:document:sap:rfc:functions&quot; /&gt;
           &lt;xsd:simpleType name=&quot;char10&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;10&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;char2&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;2&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;char20&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;20&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;char4&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;4&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:simpleType name=&quot;char8&quot;&gt;
              &lt;xsd:restriction base=&quot;xsd:string&quot;&gt;
                 &lt;xsd:maxLength value=&quot;8&quot; /&gt;
              &lt;/xsd:restriction&gt;
           &lt;/xsd:simpleType&gt;
           &lt;xsd:complexType name=&quot;ZdfSOrderStatus&quot;&gt;
              &lt;xsd:sequence&gt;
                 &lt;xsd:element name=&quot;VbelnVa&quot; type=&quot;n0:char10&quot; /&gt;
                 &lt;xsd:element name=&quot;VbelnVl&quot; type=&quot;n0:char10&quot; /&gt;
                 &lt;xsd:element name=&quot;Edatu&quot; type=&quot;n0:date10&quot; /&gt;
                 &lt;xsd:element name=&quot;Status&quot; type=&quot;n0:char50&quot; /&gt;
                 &lt;xsd:element name=&quot;StatusDate&quot; type=&quot;tns:char10&quot; /&gt;
                 &lt;xsd:element name=&quot;StatusTime&quot; type=&quot;tns:char8&quot; /&gt;
                 &lt;xsd:element name=&quot;Netwr&quot; type=&quot;n0:curr15.2&quot; /&gt;
                 &lt;xsd:element name=&quot;Waerk&quot; type=&quot;n0:cuky5&quot; /&gt;
                 &lt;xsd:element name=&quot;Ntgew&quot; type=&quot;n0:quantum13.3&quot; /&gt;
                 &lt;xsd:element name=&quot;Gewei&quot; type=&quot;n0:unit3&quot; /&gt;
                 &lt;xsd:element name=&quot;Bmeng&quot; type=&quot;n0:quantum13.3&quot; /&gt;
                 &lt;xsd:element name=&quot;Pickqty&quot; type=&quot;n0:quantum13.3&quot; /&gt;
                 &lt;xsd:element name=&quot;Vrkme&quot; type=&quot;n0:unit3&quot; /&gt;
                 &lt;xsd:element name=&quot;LineCount&quot; type=&quot;xsd:int&quot; /&gt;
                 &lt;xsd:element name=&quot;Kunnr&quot; type=&quot;tns:char10&quot; /&gt;
                 &lt;xsd:element name=&quot;Block&quot; type=&quot;tns:char2&quot; /&gt;
                 &lt;xsd:element name=&quot;Ordertype&quot; type=&quot;tns:char4&quot; /&gt;
                 &lt;xsd:element name=&quot;Shippingcondition&quot; type=&quot;tns:char20&quot; /&gt;
              &lt;/xsd:sequence&gt;
           &lt;/xsd:complexType&gt;
           &lt;xsd:complexType name=&quot;ZdfTOrderStatus&quot;&gt;
              &lt;xsd:sequence&gt;
                 &lt;xsd:element name=&quot;item&quot; type=&quot;tns:ZdfSOrderStatus&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot; /&gt;
              &lt;/xsd:sequence&gt;
           &lt;/xsd:complexType&gt;
           &lt;xsd:element name=&quot;ZOrderStatus&quot;&gt;
              &lt;xsd:complexType&gt;
                 &lt;xsd:sequence&gt;
                    &lt;xsd:element name=&quot;ImInvoiceDaylimit&quot; type=&quot;xsd:int&quot; minOccurs=&quot;0&quot; /&gt;
                 &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
           &lt;/xsd:element&gt;
           &lt;xsd:element name=&quot;ZOrderStatusResponse&quot;&gt;
              &lt;xsd:complexType&gt;
                 &lt;xsd:sequence&gt;
                    &lt;xsd:element name=&quot;ExOrders&quot; type=&quot;tns:ZdfTOrderStatus&quot; /&gt;
                 &lt;/xsd:sequence&gt;
              &lt;/xsd:complexType&gt;
           &lt;/xsd:element&gt;
        &lt;/xsd:schema&gt;
     &lt;/wsdl:types&gt;
     &lt;wsdl:message name=&quot;ZOrderStatus&quot;&gt;
        &lt;wsdl:part name=&quot;parameters&quot; element=&quot;tns:ZOrderStatus&quot; /&gt;
     &lt;/wsdl:message&gt;
     &lt;wsdl:message name=&quot;ZOrderStatusResponse&quot;&gt;
        &lt;wsdl:part name=&quot;parameter&quot; element=&quot;tns:ZOrderStatusResponse&quot; /&gt;
     &lt;/wsdl:message&gt;
     &lt;wsdl:portType name=&quot;Z_DATA_FEEDS&quot;&gt;
        &lt;wsp:Policy&gt;
           &lt;wsp:PolicyReference URI=&quot;#IF__Z_DATA_FEEDS&quot; /&gt;
        &lt;/wsp:Policy&gt;
        &lt;wsdl:operation name=&quot;ZOrderStatus&quot;&gt;
           &lt;wsp:Policy&gt;
              &lt;wsp:PolicyReference URI=&quot;#OP__ZOrderStatus&quot; /&gt;
           &lt;/wsp:Policy&gt;
           &lt;wsdl:input message=&quot;tns:ZOrderStatus&quot; /&gt;
           &lt;wsdl:output message=&quot;tns:ZOrderStatusResponse&quot; /&gt;
        &lt;/wsdl:operation&gt;
     &lt;/wsdl:portType&gt;
     &lt;wsdl:binding name=&quot;Z_DATA_FEEDS&quot; type=&quot;tns:Z_DATA_FEEDS&quot;&gt;
        &lt;wsp:Policy&gt;
           &lt;wsp:PolicyReference URI=&quot;#BN__Z_DATA_FEEDS&quot; /&gt;
        &lt;/wsp:Policy&gt;
        &lt;soap:binding transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; style=&quot;document&quot; /&gt;
        &lt;wsdl:operation name=&quot;ZOrderStatus&quot;&gt;
           &lt;soap:operation soapAction=&quot;urn:sap-com:document:sap:soap:functions:mc-style:Z_DATA_FEEDS:ZOrderStatusRequest&quot; style=&quot;document&quot; /&gt;
           &lt;wsdl:input&gt;
              &lt;soap:body use=&quot;literal&quot; /&gt;
           &lt;/wsdl:input&gt;
           &lt;wsdl:output&gt;
              &lt;soap:body use=&quot;literal&quot; /&gt;
           &lt;/wsdl:output&gt;
        &lt;/wsdl:operation&gt;
     &lt;/wsdl:binding&gt;
     &lt;wsdl:binding name=&quot;Z_DATA_FEEDS_soap12&quot; type=&quot;tns:Z_DATA_FEEDS&quot;&gt;
        &lt;wsp:Policy&gt;
           &lt;wsp:PolicyReference URI=&quot;#BN__Z_DATA_FEEDS_soap12&quot; /&gt;
        &lt;/wsp:Policy&gt;
        &lt;wsoap12:binding transport=&quot;http://schemas.xmlsoap.org/soap/http&quot; style=&quot;document&quot; /&gt;
        &lt;wsdl:operation name=&quot;ZOrderStatus&quot;&gt;
           &lt;wsoap12:operation soapAction=&quot;urn:sap-com:document:sap:soap:functions:mc-style:Z_DATA_FEEDS:ZOrderStatusRequest&quot; style=&quot;document&quot; /&gt;
           &lt;wsdl:input&gt;
              &lt;wsoap12:body use=&quot;literal&quot; /&gt;
           &lt;/wsdl:input&gt;
           &lt;wsdl:output&gt;
              &lt;wsoap12:body use=&quot;literal&quot; /&gt;
           &lt;/wsdl:output&gt;
        &lt;/wsdl:operation&gt;
     &lt;/wsdl:binding&gt;
     &lt;wsdl:service name=&quot;Z_DATA_FEEDS&quot;&gt;
        &lt;wsdl:port name=&quot;Z_DATA_FEEDS&quot; binding=&quot;tns:Z_DATA_FEEDS&quot;&gt;
           &lt;soap:address location=&quot;#### REMOVED ####&quot; /&gt;
        &lt;/wsdl:port&gt;
        &lt;wsdl:port name=&quot;Z_DATA_FEEDS_soap12&quot; binding=&quot;tns:Z_DATA_FEEDS_soap12&quot;&gt;
           &lt;wsoap12:address location=&quot;#### REMOVED ####&quot; /&gt;
        &lt;/wsdl:port&gt;
     &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  <p>Any ideas on way to consume this SOAP within <code>.NET 5.0</code>? I mean worst-case scenario we move it to OData but ideally like to tackle that at a later date.</p>
  <p>I've tried to add it using the WCF Service reference which I get the following error:</p>
  <pre><code>The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.
  XPath: //wsdl:definitions[@targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style']/wsdl:portType[@name='Z_DATA_FEEDS']/wsdl:operation[@name='ZOrderStatus']
  The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.
  XPath: //wsdl:definitions[@targetNamespace='urn:sap-com:document:sap:soap:functions:mc-style']/wsdl:portType[@name='Z_DATA_FEEDS']
  </code></pre>
  <p>That added an assembly of <code>System.ServiceModel</code> to the project but complaining about <code>.NET</code> version so been compiled for the different framework.</p>