Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinForm apps and 3 HTTP (N.B. not SOAP) secure web servi
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01538852
Message ID:
01540408
Views:
50
Rick -

Thanks again for pointing me in the right direction. Based on what you provided and a bit of research I've been able to provided the required authentication header in my web service call. In case it helps anyone else, here's a code fragment similar to what I used.
           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
________________
_____/ Regards,
____/ al

___________________________________________
www.jcn-associates.com
Visual FoxPro Database Application Development and IT Project Management
Previous
Reply
Map
View

Click here to load this message in the networking platform