I've looked at answers to adding an HTTP header to a SOAP request, and found some good ones and used the code. I think I have everything right in the attached code, but, when I look at the request in Fiddler, I can't see any header being added. Can someone look and see if I am missing something here? THank you. It is a PeopleSoft service.
UTZ_EMP_BIO_INFO_PortTypeClient utz = new UTZ_EMP_BIO_INFO_PortTypeClient();
UTZ_EMP_BIO_INFO_PortType utShare = utz;
using (System.ServiceModel.OperationContextScope scope = new System.ServiceModel.OperationContextScope((IContextChannel)utz.InnerChannel))
{
MessageHeaders messageHeadersElement = System.ServiceModel.OperationContext.Current.OutgoingMessageHeaders;
messageHeadersElement.Add(MessageHeader.CreateHeader("SOAPAction", String.Empty, "UTZ_EMP_BIO_INFO.v1"));
Console.WriteLine("down under");
SendEmpBioRespV1 resp = default(SendEmpBioRespV1);
rqst.GetEmpBioInfoReq.GetEmpBioInfo.UTZ_EMP_SRCH_VW.SSN = "123456789";
rqst.GetEmpBioInfoReq.GetEmpBioInfo.UTZ_EMP_SRCH_VW.EMPLID = "";
resp = utShare.UTZ_EMP_BIO_INFO(rqst);
Console.WriteLine(resp.SendEmpBioResp.SendEmpBioInfo.UTZ_EMP_BIO_WRK.CITY);
}