Solved

How can I add values to SOAP Header?

Posted on 2008-10-10
2
1,813 Views
Last Modified: 2013-11-26
I need to add some values to the SOAP header before calling WebService.

How can I do this in VB.Net?
0
Comment
Question by:Gary2Seven
2 Comments
 
LVL 16

Accepted Solution

by:
Gyanendra Singh earned 500 total points
ID: 22685310
0
 
LVL 2

Author Comment

by:Gary2Seven
ID: 22694829
I'm sorry I don't quite get it.

I can see that I can define my own SoapHeader with additional settings;
Public Class mySoapHeader
  Inherits System.Web.Services.Protocols.SoapHeader
  Public Username As String = String.Empty
  Public Password As String = String.Empty
End Class

But how do I get my Webservice call to use that header instead of the default class?
Public WebServiceLink As WebService.HTNGListenerSoap = New WebService.HTNGListenerSoap

??? Somehow here, I need to get WebService to use my header and therefore have username/password in header?

WebServiceLink.ReceiveMessageAsync(XmlString)

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question