using (DaWebService.DWebService.DocumentServiceSoapClient client = new DaWebService.DWebService.DocumentServiceSoapClient ()) { using (System.ServiceModel.OperationContextScope scope = new System.ServiceModel.OperationContextScope (client.InnerChannel)) { client.Open(); System.ServiceModel.Channels.HttpRequestMessageProperty httpRequestProperty = _ new System.ServiceModel.Channels.HttpRequestMessageProperty (); httpRequestProperty.Headers.Add( "AC_ACCOUNTID", "123" ); httpRequestProperty.Headers.Add( "AC_USERNAME", "ABC" ); httpRequestProperty.Headers.Add( "AC_PSWD", "DEF" ); System.ServiceModel.OperationContext .Current.OutgoingMessageProperties[System.ServiceModel.Channels.HttpRequestMessageProperty.Name] = _ httpRequestProperty;I do have a follow-up question now that I'm in debugging mode. The call is being made and received correctly, but the content (a PDF file that is base64 encoded) is not displayable on the receiving end. This led us to want to compare the actual HTTP request/XML message that we're sending to help troubleshoot the problem. How can I capture and save the HTTP Request that is being sent out by my code to the web service? Essentially I want to save for inspection the message sent by the following code.
DaWebService.DWebService. DocumentResponse response = client.ImportDocument(doc);TIA