Я построил сервис в ядре asp.net, который доступен через wsdl ниже.Я хочу добавить authheader к этому wsdl.Как мне этого добиться?Я могу успешно протестировать этот сервис с помощью Почтальона.Я использовал приведенный ниже код, чтобы он выглядел как мыльная служба.
app.UseSoapEndpoint<SampleService>("/webservice/SS.asmx", new BasicHttpBinding(), SoapSerializer.XmlSerializer);
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/" name="SampleService">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
<xs:import namespace="http://schemas.datacontract.org/2004/07/System"/>
<xs:element name="Test">
<xs:complexType>
<xs:sequence/>
</xs:complexType>
</xs:element>
<xs:element name="TestResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="TestResult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="SampleService_Test_InputMessage">
<wsdl:part name="parameters" element="tns:Test"/>
</wsdl:message>
<wsdl:message name="SampleService_Test_OutputMessage">
<wsdl:part name="parameters" element="tns:TestResponse"/>
</wsdl:message>
<wsdl:portType name="SampleService">
<wsdl:operation name="Test">
<wsdl:input message="tns:SampleService_Test_InputMessage"/>
<wsdl:output message="tns:SampleService_Test_OutputMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_SampleService" type="tns:SampleService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Test">
<soap:operation soapAction="http://tempuri.org/SampleService/Test" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SampleService">
<wsdl:port name="BasicHttpBinding_SampleService" binding="tns:BasicHttpBinding_SampleService">
<soap:address location="http://localhost:32156/webservice/SS.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>