Any help please. I'm trying to consume a method in a WCF web service that has the envelop bellow :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:esig="http://test.com/test" xmlns:ser="http://test.com/test/service">
<soapenv:Header/>
<soapenv:Body>
<es:meth>
<ser:methRequest>
<ser:meth>?</ser:meth>
</ser:methRequest>
</es:meth>
</soapenv:Body>
</soapenv:Envelope>
The problem is I can't communicate with the ws because I have to pass a token inside soap:header. When I add manually the header in soapUI it works. But in my c# code I don't know how to do it.
<soapenv:Header>
<OTAuthentication xmlns="test.com">
<AuthenticationToken>MyToken</AuthenticationToken>
</OTAuthentication>
</soapenv:Header>
Please any help to add the heade with c# before calling the web service in order to have envelop like this :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:esig="http://test.com/test" xmlns:ser="http://test.com/test/service">
<soapenv:Header>
<OTAuthentication xmlns="test.com">
<AuthenticationToken>MyToken</AuthenticationToken>
</OTAuthentication>
</soapenv:Header>
<soapenv:Body>
<es:meth>
<ser:methRequest>
<ser:meth>?</ser:meth>
</ser:methRequest>
</es:meth>
</soapenv:Body>
</soapenv:Envelope>